Skip to content

Commit 3dc3398

Browse files
committed
docs: Add style details to readme
1 parent e5fc9e8 commit 3dc3398

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ yarn add react-simple
1919
```
2020

2121
# Usage
22+
## React
2223

2324
`react-simple-hook-modal` has a super simple API and utilises React hooks.
2425

@@ -51,6 +52,14 @@ const App = () => (
5152
5253
```
5354

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+
5463
# Example
5564

5665
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.
7382

7483
[logo]: https://raw.githubusercontent.com/mbrookson/react-simple-hook-modal/master/logo.png
7584

76-
[demo]: https://react-simple-hook-modal.now.sh/
85+
[demo]: https://react-simple-hook-modal.now.sh/
86+
87+
[tailwind]: https://tailwindcss.com/

0 commit comments

Comments
 (0)