Skip to main content

CancelIcon

Reference​

  • CancelIcon is the cross icon the platform uses to close popups.
  • Use it inside a transparent Button for the close button of a custom drill-down popup.

Props​

  1. style — Optional inline styles for the icon.
  2. className — Optional CSS class for the icon.

Usage Example​

function Example({ onClose }) {
const { protrakComponents } = React.useContext(customWidgetContext);
const { Button, ButtonEnums, CancelIcon } = protrakComponents;

return (
<Button
appearance={ButtonEnums.Appearance.TransparentWithHover}
size={ButtonEnums.Size.Small}
onClick={onClose}
>
<CancelIcon />
</Button>
);
}