diff --git a/client/src/components/atoms/DatePicker/DatePicker.stories.tsx b/client/src/components/atoms/DatePicker/DatePicker.stories.tsx new file mode 100644 index 0000000..99839de --- /dev/null +++ b/client/src/components/atoms/DatePicker/DatePicker.stories.tsx @@ -0,0 +1,15 @@ +import React, { ChangeEvent, useState } from 'react'; +import { text } from '@storybook/addon-knobs'; +import DatePicker from './DatePicker'; + +export default { + title: 'Components/DatePicker', + component: DatePicker, +}; + +export const Default = () => { + const value = text('date', '2020-11-04'); + const onChange = (e: ChangeEvent) => {}; + + return ; +}; diff --git a/client/src/components/atoms/DatePicker/DatePicker.tsx b/client/src/components/atoms/DatePicker/DatePicker.tsx new file mode 100644 index 0000000..d1ac6ff --- /dev/null +++ b/client/src/components/atoms/DatePicker/DatePicker.tsx @@ -0,0 +1,28 @@ +import React, { FunctionComponent, ChangeEvent } from 'react'; +import styled from '@themes/styled'; + +const StyledDatePicker = styled.input` + background-color: ${({ theme }) => theme.palette.BG_COLOR01}; + font-size: 0.8rem; + color: ${({ theme }) => theme.palette.PRIMARY}; + border-radius: 0.5rem; + padding: 5px 12px; + width: 440px; + border: 1px solid ${({ theme }) => theme.palette.BG_COLOR02}; + &:focus { + background-color: ${({ theme }) => theme.palette.LIGHT}; + border-color: ${({ theme }) => theme.palette.LINK_BLUE}; + box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.3); + } +`; + +interface Props { + value: string; + onChange: (e: ChangeEvent) => void; +} + +const DatePicker: FunctionComponent = ({ value, onChange }) => ( + +); + +export default DatePicker; diff --git a/client/src/components/atoms/DatePicker/index.ts b/client/src/components/atoms/DatePicker/index.ts new file mode 100644 index 0000000..2ef49e2 --- /dev/null +++ b/client/src/components/atoms/DatePicker/index.ts @@ -0,0 +1 @@ +export { default } from './DatePicker'; diff --git a/client/src/components/atoms/FilterButton/FilterButton.stories.tsx b/client/src/components/atoms/FilterButton/FilterButton.stories.tsx new file mode 100644 index 0000000..b22ad48 --- /dev/null +++ b/client/src/components/atoms/FilterButton/FilterButton.stories.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { text } from '@storybook/addon-knobs'; +import FilterButton from './FilterButton'; + +export default { + title: 'Components/FilterButton', + component: FilterButton, +}; + +export const Default = () => { + const onClick = () => {}; + const value = text('button text', 'Author'); + + return ; +}; diff --git a/client/src/components/atoms/FilterButton/FilterButton.tsx b/client/src/components/atoms/FilterButton/FilterButton.tsx new file mode 100644 index 0000000..b21e759 --- /dev/null +++ b/client/src/components/atoms/FilterButton/FilterButton.tsx @@ -0,0 +1,23 @@ +import React, { FunctionComponent } from 'react'; +import styled from '@themes/styled'; + +const StyledFilterButton = styled.button` + all: unset; + color: ${({ theme }) => theme.palette.SECONDARY}; + font-size: 0.8rem; + &:hover { + color: ${({ theme }) => theme.palette.PRIMARY}; + cursor: pointer; + } +`; + +interface Props { + onClick: () => void; + text: string; +} + +const FilterButton: FunctionComponent = ({ onClick, text }) => ( + {text} ▾ +); + +export default FilterButton; diff --git a/client/src/components/atoms/FilterButton/index.ts b/client/src/components/atoms/FilterButton/index.ts new file mode 100644 index 0000000..e364f4d --- /dev/null +++ b/client/src/components/atoms/FilterButton/index.ts @@ -0,0 +1 @@ +export { default } from './FilterButton'; diff --git a/client/src/components/atoms/InputLabel/InputLabel.stories.tsx b/client/src/components/atoms/InputLabel/InputLabel.stories.tsx new file mode 100644 index 0000000..b200095 --- /dev/null +++ b/client/src/components/atoms/InputLabel/InputLabel.stories.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { text } from '@storybook/addon-knobs'; +import InputLabel from './InputLabel'; + +export default { + title: 'Components/InputLabel', + component: InputLabel, +}; + +export const Default = () => { + const value = text('label', 'Due date (optional)'); + return ; +}; diff --git a/client/src/components/atoms/InputLabel/InputLabel.tsx b/client/src/components/atoms/InputLabel/InputLabel.tsx new file mode 100644 index 0000000..67379bd --- /dev/null +++ b/client/src/components/atoms/InputLabel/InputLabel.tsx @@ -0,0 +1,17 @@ +import React, { FunctionComponent } from 'react'; +import styled from '@themes/styled'; + +const StyledInputLabel = styled.span` + font-size: 1rem; + font-weight: 600; +`; + +interface Props { + text: string; +} + +const InputLabel: FunctionComponent = ({ text }) => ( + {text} +); + +export default InputLabel; diff --git a/client/src/components/atoms/InputLabel/index.ts b/client/src/components/atoms/InputLabel/index.ts new file mode 100644 index 0000000..3b0b90a --- /dev/null +++ b/client/src/components/atoms/InputLabel/index.ts @@ -0,0 +1 @@ +export { default } from './InputLabel'; diff --git a/client/src/components/atoms/LabelTag/LabelTag.stories.tsx b/client/src/components/atoms/LabelTag/LabelTag.stories.tsx new file mode 100644 index 0000000..75d7955 --- /dev/null +++ b/client/src/components/atoms/LabelTag/LabelTag.stories.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { text } from '@storybook/addon-knobs'; +import LabelTag from './LabelTag'; + +export default { + title: 'Components/LabelTag', + component: LabelTag, +}; + +export const Default = () => { + const value = text('tag text', 'Bug'); + const bgColor = text('background color', '#a30a0a'); + + return ; +}; diff --git a/client/src/components/atoms/LabelTag/LabelTag.tsx b/client/src/components/atoms/LabelTag/LabelTag.tsx new file mode 100644 index 0000000..14e1987 --- /dev/null +++ b/client/src/components/atoms/LabelTag/LabelTag.tsx @@ -0,0 +1,23 @@ +import React, { FunctionComponent } from 'react'; +import styled from '@themes/styled'; + +const StyledLabelTag = styled.span` + display: inline-block; + padding: 0 7px; + font-size: 12px; + font-weight: 500; + border-radius: 1rem; + color: #000; + line-height: 18px; +`; + +interface Props { + text: string; + bgColor: string; +} + +const LabelTag: FunctionComponent = ({ text, bgColor }) => ( + {text} +); + +export default LabelTag; diff --git a/client/src/components/atoms/LabelTag/index.ts b/client/src/components/atoms/LabelTag/index.ts new file mode 100644 index 0000000..e0c8014 --- /dev/null +++ b/client/src/components/atoms/LabelTag/index.ts @@ -0,0 +1 @@ +export { default } from './LabelTag'; diff --git a/client/src/components/atoms/TextArea/TextArea.stories.tsx b/client/src/components/atoms/TextArea/TextArea.stories.tsx new file mode 100644 index 0000000..8d16ccd --- /dev/null +++ b/client/src/components/atoms/TextArea/TextArea.stories.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { text } from '@storybook/addon-knobs'; +import Textarea from './TextArea'; + +export default { + title: 'Components/Textarea', + component: Textarea, +}; + +export const Default = () => { + const placeholder = text('placeholder', 'Leave a comment'); + return