Inplace Icon

UI Components for React
Post Reply
DataUndefined
Posts: 3
Joined: 05 Oct 2021, 16:17

01 Nov 2021, 17:29

I want to change the icon that's displayed in the button that the Inplace component renders when the closable prop is set.

Currently it displays an X icon which I can see is hard-coded in the renderClosebutton() function in inplace.js:

Code: Select all

      key: "renderCloseButton",
      value: function renderCloseButton() {
        if (this.props.closable) {
          return /*#__PURE__*/React__default['default'].createElement(button.Button, {
            type: "button",
            className: "p-inplace-content-close",
            icon: "pi pi-times",
            onClick: this.close
          });
        }
I tried changing this from pi-times to pi-check and did this in both the minimised and non-minised .js files, but the X icon is still displayed.

Ideally the icon could be provided by a component prop (can you add this to the feature request list?), but for the time-being I would be happy to hard code it. I thought that doing so in the Inplace component's .js files would do the trick, but no. Can you provide some guidance on how to do this?

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests