mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-11-14 17:35:35 +01:00
Add information about optional sizes to docs
This commit is contained in:
parent
6f05d5d136
commit
6480a39cdb
|
@ -1,8 +1,19 @@
|
||||||
Bootstrap modal component.
|
Bootstrap modal component.
|
||||||
|
|
||||||
it's required to have an element `<div id={"modal-container"}/>` somewhere on
|
It's required to have an element `<div id={"modal-container"}/>` somewhere on
|
||||||
the page since modals are rendered in portals.
|
the page since modals are rendered in portals.
|
||||||
|
|
||||||
|
Modals also have three optional sizes, which can be defined through the `size`
|
||||||
|
prop:
|
||||||
|
|
||||||
|
- small - `sm`
|
||||||
|
- large - `lg`
|
||||||
|
- extra-large - `xl`
|
||||||
|
|
||||||
|
For more details please visit Bootstrap
|
||||||
|
<a href="https://getbootstrap.com/docs/4.5/components/modal/#optional-sizes" target="_blank">
|
||||||
|
documentation</a>.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
<div id="modal-container" />
|
<div id="modal-container" />
|
||||||
```
|
```
|
||||||
|
@ -14,7 +25,7 @@ import { useState } from "react";
|
||||||
const [shown, setShown] = useState(false);
|
const [shown, setShown] = useState(false);
|
||||||
|
|
||||||
<>
|
<>
|
||||||
<Modal setShown={setShown} shown={shown}>
|
<Modal setShown={setShown} shown={shown} size="sm">
|
||||||
<ModalHeader setShown={setShown} title="Warning!" />
|
<ModalHeader setShown={setShown} title="Warning!" />
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<p>Bla bla bla...</p>
|
<p>Bla bla bla...</p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user