From 0ad7444fb1dc2cdb82830df4ef241d75a6bfd82d Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Fri, 15 Oct 2021 15:25:41 +0530 Subject: chore: move 'packages/ui' into 'src' (no longer an injected package) (#2077) --- src/components/ui/icon/index.tsx | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/components/ui/icon/index.tsx (limited to 'src/components/ui/icon') diff --git a/src/components/ui/icon/index.tsx b/src/components/ui/icon/index.tsx new file mode 100644 index 000000000..fdc48d14a --- /dev/null +++ b/src/components/ui/icon/index.tsx @@ -0,0 +1,46 @@ +import MdiIcon from '@mdi/react'; +import classnames from 'classnames'; +import { Component } from 'react'; +import injectStyle from 'react-jss'; + +import { Theme } from '@meetfranz/theme'; +import { IWithStyle } from '../typings/generic'; + +interface IProps extends IWithStyle { + icon: string; + size?: number; + className?: string; +} + +const styles = (theme: Theme) => ({ + icon: { + fill: theme.colorText, + }, +}); + +class IconComponent extends Component { + public static defaultProps = { + size: 1, + }; + + render() { + const { classes, icon, size, className } = this.props; + + if (!icon) { + console.warn('No Icon specified'); + } + + return ( + + ); + } +} + +export const Icon = injectStyle(styles)(IconComponent); -- cgit v1.2.3-54-g00ecf