You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ yarn add react-simple
19
19
```
20
20
21
21
# Usage
22
+
## React
22
23
23
24
`react-simple-hook-modal` has a super simple API and utilises React hooks.
24
25
@@ -51,6 +52,14 @@ const App = () => (
51
52
52
53
```
53
54
55
+
## Styles
56
+
`react-simple-hook-modal` uses a subset of [tailwindcss][tailwind] under the hood. The tailwind classes used have a prefix of `rsm` added to avoid potential conflicts with your own styles. You can import the default styles using:
57
+
```
58
+
import 'react-simple-hook-modal/styles.css';
59
+
```
60
+
`ModalProvider` also takes an optional `backdropClassName` which can contain one or more classes to append and override the default styles (e.g. Changing the backdrop colour can be done by adding the class `bg-blue-800`).
61
+
62
+
54
63
# Example
55
64
56
65
See the `example` directory in the repository for a full example including multiple stacked modals.
@@ -73,4 +82,6 @@ If you have any issues, please create an issue here on GitHub.
0 commit comments