@fellesdatakatalog/alert
v0.3.9
Published
Felles datakatalog UI alert component
Downloads
63
Readme
@fellesdatakatalog/alert
Alert component displays an alert message.
Installation
npm i @fellesdatakatalog/alert
Dependencies
- react
- styled-components
- @material-ui/icons
- @fellesdatakatalog/theme
Usage
Basic usage
In order to use the alert component, wrap the application in global theme provider from @fellesdatakatalog/theme
. Then, use the alert as any regular component.
import React, { FC } from 'react';
import ThemeProvider from '@fellesdatakatalog/theme';
import Alert, { Severity } from '@fellesdatakatalog/alert';
const App: FC = () => (
<ThemeProvider>
<Alert severity={Severity.SUCCESS}>
You succeeded!
</Alert>
</ThemeProvider>
);
export default App;