aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/ui/input.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-20 04:45:12 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-20 04:45:12 +0800
commitd5105b5c9f74a4f52e4952b845a37692bb824fd4 (patch)
tree2d7d5cd24088ce9652d5b79a9d5bc133436cfcb5 /packages/instant/src/components/ui/input.tsx
parent43ad2fe23bec01b077f5c55a23736fdcb24781a3 (diff)
downloaddexon-sol-tools-d5105b5c9f74a4f52e4952b845a37692bb824fd4.tar
dexon-sol-tools-d5105b5c9f74a4f52e4952b845a37692bb824fd4.tar.gz
dexon-sol-tools-d5105b5c9f74a4f52e4952b845a37692bb824fd4.tar.bz2
dexon-sol-tools-d5105b5c9f74a4f52e4952b845a37692bb824fd4.tar.lz
dexon-sol-tools-d5105b5c9f74a4f52e4952b845a37692bb824fd4.tar.xz
dexon-sol-tools-d5105b5c9f74a4f52e4952b845a37692bb824fd4.tar.zst
dexon-sol-tools-d5105b5c9f74a4f52e4952b845a37692bb824fd4.zip
feat: user better syntax for defining ui components
Diffstat (limited to 'packages/instant/src/components/ui/input.tsx')
-rw-r--r--packages/instant/src/components/ui/input.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx
index f8c6b6ef6..9db7d1c4c 100644
--- a/packages/instant/src/components/ui/input.tsx
+++ b/packages/instant/src/components/ui/input.tsx
@@ -12,11 +12,7 @@ export interface InputProps {
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
}
-const PlainInput: React.StatelessComponent<InputProps> = ({ value, className, placeholder, onChange }) => (
- <input className={className} value={value} onChange={onChange} placeholder={placeholder} />
-);
-
-export const Input = styled(PlainInput)`
+export const Input = styled<InputProps, 'input'>('input')`
font-size: ${props => props.fontSize};
width: ${props => props.width};
padding: 0.1em 0em;