mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Fix and update docs.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
Bootstrap alert component.
|
||||
|
||||
```jsx
|
||||
import {useState} from 'react';
|
||||
|
||||
@ -7,14 +8,14 @@ function AlertExample(){
|
||||
if (alert)
|
||||
return <Alert
|
||||
type='warning'
|
||||
message='Some warning out there!'
|
||||
onDismiss={()=>setAlert(false)}
|
||||
/>;
|
||||
>
|
||||
Some warning out there!
|
||||
</Alert>;
|
||||
return <button
|
||||
className='btn btn-secondary'
|
||||
onClick={()=>setAlert(true)}
|
||||
>Show alert again</button>;
|
||||
};
|
||||
<AlertExample/>
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user