From b04753211e65fe97112d16d439ec7f4b4b37ad21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=CC=81n=20Mikla=CC=81s=CC=8C?= Date: Wed, 6 May 2020 17:32:34 +0200 Subject: [PATCH] Add Select component [MAILPOET-2772] --- assets/js/src/common/form/select/select.tsx | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 assets/js/src/common/form/select/select.tsx diff --git a/assets/js/src/common/form/select/select.tsx b/assets/js/src/common/form/select/select.tsx new file mode 100644 index 0000000000..5165b936d6 --- /dev/null +++ b/assets/js/src/common/form/select/select.tsx @@ -0,0 +1,38 @@ +import React from 'react'; +import classnames from 'classnames'; + +type Props = { + children?: React.ReactNode, + size?: 'small', + isFullWidth?: boolean, + iconStart?: JSX.Element, + [attribute: string]: any, // any HTML attributes, e.g. name, id +}; + +const Select = ({ + children, + size, + isFullWidth, + iconStart, + ...attributes +}: Props) => ( +
+ {iconStart} + +
+); + +export default Select;