Skip to content

Commit

Permalink
docs: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TimMikeladze committed Dec 27, 2023
1 parent 452f3dd commit d06d858
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,30 @@ export default () => {
return <Button onClick={handleDelete}>Delete</Button>;
};
```

You can also customize the dialog by passing `defaultOptions` to the `ConfirmProvider` or directly to the `confirm` function.

```tsx
import { ConfirmProvider } from 'joy-ui-confirm';

export default () => {
return (
<ConfirmProvider
defaultOptions={{
confirmationButtonProps: {
variant: `outlined`,
color: `success`,
size: `sm`,
},
cancellationButtonProps: {
variant: `outlined`,
color: `warning`,
size: `sm`,
},
}}
>
<App />
</ConfirmProvider>
);
};
```

0 comments on commit d06d858

Please # to comment.