|
14 | 14 | - [Install](#install) |
15 | 15 | - [Usage](#usage) |
16 | 16 | - [Documentation](#documentation) |
| 17 | +- [Contributors](#contributors) |
17 | 18 | - [License](#license) |
18 | 19 |
|
19 | 20 | --- |
|
25 | 26 | |  |  | |
26 | 27 | | [Preview!](https://codesandbox.io/s/react-use-presentation-1c2du) | [Preview with BG video!](https://codesandbox.io/s/react-use-presentation-with-bg-d7f7j) | |
27 | 28 |
|
| 29 | +> You may also find a running [example](./example) in this project which are served at [Github Pages](https://olavoparno.github.io/react-use-presentation). |
| 30 | +
|
28 | 31 | --- |
29 | 32 |
|
30 | 33 | ## Install |
@@ -193,6 +196,7 @@ import { myFramesArray1 } from './myFramesArray'; |
193 | 196 |
|
194 | 197 | export default function App() { |
195 | 198 | const [startTrigger, setStartTrigger] = React.useState(false); |
| 199 | + |
196 | 200 | const [PresentationTriggered] = usePresentation({ |
197 | 201 | framesOptions: myFramesArray1, |
198 | 202 | startTrigger, |
@@ -250,6 +254,50 @@ const [ |
250 | 254 | ] = usePresentation(); |
251 | 255 | ``` |
252 | 256 |
|
| 257 | +`CSS selectors`: |
| 258 | + |
| 259 | +- Both frames with or without children have its own CSS selectors: |
| 260 | + |
| 261 | +1. Without children: `className="animation-frame"` |
| 262 | +2. With children: `className="animation-frame with-children"` |
| 263 | + |
| 264 | +- You can also pass in your own className: |
| 265 | + |
| 266 | +1. With or without children: |
| 267 | + |
| 268 | +```tsx |
| 269 | +const [PresentationCustomCss] = usePresentation({ |
| 270 | + framesOptions: myFramesArray1, |
| 271 | + startTrigger: true, |
| 272 | +}); |
| 273 | + |
| 274 | +return <PresentationCustomCss className="my-custom-class" />; |
| 275 | +``` |
| 276 | + |
| 277 | +- **The default behaviour is to automatically merge classNames.** |
| 278 | + |
| 279 | +--- |
| 280 | + |
| 281 | +## Contributors |
| 282 | + |
| 283 | +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): |
| 284 | + |
| 285 | +<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> |
| 286 | +<!-- prettier-ignore-start --> |
| 287 | +<!-- markdownlint-disable --> |
| 288 | +<table> |
| 289 | + <tr> |
| 290 | + <td align="center"><a href="https://olavoparno.github.io"><img src="https://avatars1.githubusercontent.com/u/7513162?v=4?s=70" width="70px;" alt=""/><br /><sub><b>Olavo Parno</b></sub></a><br /><a href="#ideas-olavoparno" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/olavoparno/react-use-presentation/commits?author=olavoparno" title="Code">💻</a> <a href="https://github.com/olavoparno/react-use-presentation/commits?author=olavoparno" title="Tests">⚠️</a></td> |
| 291 | + </tr> |
| 292 | +</table> |
| 293 | + |
| 294 | +<!-- markdownlint-restore --> |
| 295 | +<!-- prettier-ignore-end --> |
| 296 | + |
| 297 | +<!-- ALL-CONTRIBUTORS-LIST:END --> |
| 298 | + |
| 299 | +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! |
| 300 | + |
253 | 301 | --- |
254 | 302 |
|
255 | 303 | ## License |
|
0 commit comments