Alert component displays an alert message.
npm i @fellesdatakatalog/alert
- react
- styled-components
- @material-ui/icons
- @fellesdatakatalog/theme
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;