| section | Extensions | |
|---|---|---|
| subsection | Component groups | |
| id | Close button | |
| source | react | |
| propComponents |
|
|
| sourceLink | https://github.com/patternfly/react-component-groups/blob/main/packages/module/patternfly-docs/content/extensions/component-groups/examples/CloseButton/CloseButton.md |
import { CloseIcon } from '@patternfly/react-icons'; import CloseButton from '@patternfly/react-component-groups/dist/dynamic/CloseButton'; import { FunctionComponent } from 'react';
The close button component provides a way for users to exit a modal, dialogue, or similar action. To further customize this component, you can also utilize all properties of the button component.
You can use onClick to execute a callback when a user clicks the close button.