Skip to content

Commit

Permalink
Merge pull request #64 from edonehoo/iss63
Browse files Browse the repository at this point in the history
  • Loading branch information
fhlavac authored Oct 24, 2023
2 parents 6e0ab4b + 930eec5 commit 0519a30
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ propComponents: ['WarningModal']

import WarningModal from '@patternfly/react-component-groups/dist/dynamic/WarningModal';

A **warning modal** component displays a modal asking user to confirm his intention to perform a risky action.
A **warning modal** component displays a modal when a user tries to perform a risky action, which asks them to confirm or cancel the action.

## Examples

### Basic warning modal

A basic warning modal component provides users with a basic layout to which only specific texts need to be passed.
Action buttons callbacks can be customized using `onConfirm` and `onClose`.
A basic warning modal is triggered when a user tries to perform an action that is deemed risky.

You can customize the contents of the modal to fit your use cases. To adjust the text in the modal, pass your desired title to `title` and your message to the `<WarningModal>` component. To customize the action buttons in the modal, use `onConfirm` and `onClose`.

```js file="./WarningModalExample.tsx"

Expand Down

0 comments on commit 0519a30

Please sign in to comment.