From 84aa6476c152acf75c982a37e51590edcdc6f5eb Mon Sep 17 00:00:00 2001 From: Robert Vogt Date: Tue, 13 Dec 2022 10:39:10 +0100 Subject: [PATCH] feat(TextField): Add Component and Write Card Example --- src/components/icons/airplane.tsx | 20 +++++++++++ src/components/icons/upload.tsx | 17 +++++++++ src/components/text-field.tsx | 23 +++++++++++++ stories/card.stories.tsx | 57 +++++++++++++++++++++++++------ stories/text-field.stories.tsx | 27 +++++++++++++++ 5 files changed, 134 insertions(+), 10 deletions(-) create mode 100644 src/components/icons/airplane.tsx create mode 100644 src/components/icons/upload.tsx create mode 100644 src/components/text-field.tsx create mode 100644 stories/text-field.stories.tsx diff --git a/src/components/icons/airplane.tsx b/src/components/icons/airplane.tsx new file mode 100644 index 0000000..289044f --- /dev/null +++ b/src/components/icons/airplane.tsx @@ -0,0 +1,20 @@ +import React, { FC } from 'react'; + +type Props = { + size?: string; +}; +export const AirplaneIcon: FC = ({ size = '16' }) => ( + + + + + + + + + + +); diff --git a/src/components/icons/upload.tsx b/src/components/icons/upload.tsx new file mode 100644 index 0000000..307961e --- /dev/null +++ b/src/components/icons/upload.tsx @@ -0,0 +1,17 @@ +import React, { FC } from 'react'; + +type Props = { + size?: string; +}; +export const UploadIcon: FC = ({ size = '16' }) => ( + + + + +); diff --git a/src/components/text-field.tsx b/src/components/text-field.tsx new file mode 100644 index 0000000..741ff55 --- /dev/null +++ b/src/components/text-field.tsx @@ -0,0 +1,23 @@ +import React, { ChangeEvent, FC } from 'react'; +import { merge } from '../merge'; + +type Props = { + placeholder: string; + value: string; + onChange(e: ChangeEvent): void; +}; + +export const TextField: FC = ({ placeholder, value, onChange }) => ( +