summaryrefslogtreecommitdiffstats
path: root/src/components/ui/error
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-10-15 16:22:25 +0530
committerLibravatar GitHub <noreply@github.com>2021-10-15 16:22:25 +0530
commitec15f83b947fb2daf4ca1a72e3af527dc89512a3 (patch)
treeea049cee5184a58b5bc09505e723cd19a736c4bd /src/components/ui/error
parentchore: move 'packages/ui' into 'src' (no longer an injected package) (#2077) (diff)
downloadferdium-app-ec15f83b947fb2daf4ca1a72e3af527dc89512a3.tar.gz
ferdium-app-ec15f83b947fb2daf4ca1a72e3af527dc89512a3.tar.zst
ferdium-app-ec15f83b947fb2daf4ca1a72e3af527dc89512a3.zip
chore: move 'packages/forms' into 'src' (no longer an injected package) (#2079)
Diffstat (limited to 'src/components/ui/error')
-rw-r--r--src/components/ui/error/index.tsx20
-rw-r--r--src/components/ui/error/styles.ts9
2 files changed, 29 insertions, 0 deletions
diff --git a/src/components/ui/error/index.tsx b/src/components/ui/error/index.tsx
new file mode 100644
index 000000000..8439bfc8b
--- /dev/null
+++ b/src/components/ui/error/index.tsx
@@ -0,0 +1,20 @@
1import { Classes } from 'jss';
2import { Component } from 'react';
3import injectSheet from 'react-jss';
4
5import styles from './styles';
6
7interface IProps {
8 classes: Classes;
9 message: string;
10}
11
12class ErrorComponent extends Component<IProps> {
13 render() {
14 const { classes, message } = this.props;
15
16 return <p className={classes.message}>{message}</p>;
17 }
18}
19
20export const Error = injectSheet(styles)(ErrorComponent);
diff --git a/src/components/ui/error/styles.ts b/src/components/ui/error/styles.ts
new file mode 100644
index 000000000..ed993ddd5
--- /dev/null
+++ b/src/components/ui/error/styles.ts
@@ -0,0 +1,9 @@
1import { Theme } from '@meetfranz/theme';
2
3export default (theme: Theme) => ({
4 message: {
5 color: theme.brandDanger,
6 margin: '5px 0 0',
7 fontSize: theme.uiFontSize,
8 },
9});