From 3e692e482e0751ce73cf24055a76b4fa337c0d3c Mon Sep 17 00:00:00 2001 From: newick Date: Fri, 7 Jun 2019 11:28:55 +0200 Subject: [PATCH 01/19] style(Contribute): add form elements add intention selector change cheap selector to efficient ones --- .../CreateNoticeScreen.stories.tsx | 10 ++ .../App/CreateNoticeScreen/Textarea.tsx | 7 ++ .../content/App/CreateNoticeScreen/index.tsx | 29 ++++++ .../App/Notice/Details/Details.stories.tsx | 23 +++++ .../content/App/Notice/Details/withConnect.ts | 1 + .../App/PublishedNoticeScreen/Container.ts | 21 +++++ .../App/PublishedNoticeScreen/Content.ts | 6 ++ .../App/PublishedNoticeScreen/ContentTitle.ts | 7 ++ .../PublishedNoticeScreen/Illustration.tsx | 91 +++++++++++++++++++ .../PublishedNoticeScreen.stories.tsx | 9 ++ .../App/PublishedNoticeScreen/index.tsx | 27 ++++++ src/app/theme.ts | 4 +- src/components/atoms/ContentWrapper.ts | 6 ++ .../atoms/Forms/Error/Error.stories.tsx | 7 ++ src/components/atoms/Forms/Error/Error.ts | 9 ++ .../atoms/Forms/Input/Input.stories.tsx | 22 +++++ src/components/atoms/Forms/Input/Input.ts | 25 +++++ .../atoms/Forms/Textarea/Textarea.stories.tsx | 11 ++- .../atoms/Forms/Textarea/Textarea.ts | 19 +++- .../Type => atoms/Intentions}/Background.ts | 10 +- .../atoms/Intentions/Intention.stories.tsx | 24 +++++ .../Intentions}/IntentionIcon.tsx | 11 ++- src/components/atoms/icons/Alternative.tsx | 27 ++++++ src/components/atoms/icons/Information.tsx | 29 ++++++ src/components/atoms/icons/IntentionsIcons.ts | 21 +++++ src/components/atoms/icons/Other.tsx | 26 ++++++ .../{types/Dislike.tsx => ThumbDown.tsx} | 11 ++- .../icons/{types/Like.tsx => ThumbUp.tsx} | 11 ++- .../atoms/icons/types/Alternative.tsx | 13 --- .../atoms/icons/types/Information.tsx | 15 --- src/components/atoms/icons/types/Other.tsx | 14 --- src/components/atoms/icons/types/index.ts | 22 ----- src/components/atoms/index.ts | 1 + .../IntentionsSelector.stories.tsx | 10 ++ .../IntentionsSelector/IntentionsSelector.tsx | 22 +++++ .../IntentionsSelectorContainer.ts | 14 +++ .../molecules/Type/Type.stories.tsx | 13 --- src/components/organisms/Notice/Notice.tsx | 6 +- .../NoticeDetails/CenterContainer.ts | 11 +++ .../NoticeDetails/DetailsContainer.ts | 3 + .../organisms/NoticeDetails/DetailsContent.ts | 2 +- .../organisms/NoticeDetails/Feedbacks.ts | 3 +- .../NoticeDetails/NoticeDetails.stories.tsx | 10 ++ .../organisms/NoticeDetails/NoticeDetails.tsx | 14 +-- 44 files changed, 559 insertions(+), 118 deletions(-) create mode 100644 src/app/content/App/CreateNoticeScreen/CreateNoticeScreen.stories.tsx create mode 100644 src/app/content/App/CreateNoticeScreen/Textarea.tsx create mode 100644 src/app/content/App/CreateNoticeScreen/index.tsx create mode 100644 src/app/content/App/PublishedNoticeScreen/Container.ts create mode 100644 src/app/content/App/PublishedNoticeScreen/Content.ts create mode 100644 src/app/content/App/PublishedNoticeScreen/ContentTitle.ts create mode 100644 src/app/content/App/PublishedNoticeScreen/Illustration.tsx create mode 100644 src/app/content/App/PublishedNoticeScreen/PublishedNoticeScreen.stories.tsx create mode 100644 src/app/content/App/PublishedNoticeScreen/index.tsx create mode 100644 src/components/atoms/ContentWrapper.ts create mode 100644 src/components/atoms/Forms/Error/Error.stories.tsx create mode 100644 src/components/atoms/Forms/Error/Error.ts create mode 100644 src/components/atoms/Forms/Input/Input.stories.tsx create mode 100644 src/components/atoms/Forms/Input/Input.ts rename src/components/{molecules/Type => atoms/Intentions}/Background.ts (66%) create mode 100644 src/components/atoms/Intentions/Intention.stories.tsx rename src/components/{molecules/Type => atoms/Intentions}/IntentionIcon.tsx (63%) create mode 100644 src/components/atoms/icons/Alternative.tsx create mode 100644 src/components/atoms/icons/Information.tsx create mode 100644 src/components/atoms/icons/IntentionsIcons.ts create mode 100644 src/components/atoms/icons/Other.tsx rename src/components/atoms/icons/{types/Dislike.tsx => ThumbDown.tsx} (85%) rename src/components/atoms/icons/{types/Like.tsx => ThumbUp.tsx} (86%) delete mode 100644 src/components/atoms/icons/types/Alternative.tsx delete mode 100644 src/components/atoms/icons/types/Information.tsx delete mode 100644 src/components/atoms/icons/types/Other.tsx delete mode 100644 src/components/atoms/icons/types/index.ts create mode 100644 src/components/molecules/IntentionsSelector/IntentionsSelector.stories.tsx create mode 100644 src/components/molecules/IntentionsSelector/IntentionsSelector.tsx create mode 100644 src/components/molecules/IntentionsSelector/IntentionsSelectorContainer.ts delete mode 100644 src/components/molecules/Type/Type.stories.tsx create mode 100644 src/components/organisms/NoticeDetails/CenterContainer.ts diff --git a/src/app/content/App/CreateNoticeScreen/CreateNoticeScreen.stories.tsx b/src/app/content/App/CreateNoticeScreen/CreateNoticeScreen.stories.tsx new file mode 100644 index 000000000..38f91a25c --- /dev/null +++ b/src/app/content/App/CreateNoticeScreen/CreateNoticeScreen.stories.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import { storiesOf } from '@storybook/react'; +import { action } from '@storybook/addon-actions'; +import { MemoryRouter as Router } from 'react-router-dom'; +import CreateNoticeScreen from '.'; + +storiesOf('screens/CreateNotice', module) + .addDecorator(getStory => {getStory()}) + .add('normal', () => ) + .add('error', () => ); diff --git a/src/app/content/App/CreateNoticeScreen/Textarea.tsx b/src/app/content/App/CreateNoticeScreen/Textarea.tsx new file mode 100644 index 000000000..740ce6a55 --- /dev/null +++ b/src/app/content/App/CreateNoticeScreen/Textarea.tsx @@ -0,0 +1,7 @@ +import React from 'react'; +import styled from 'styled-components'; +import Button from 'components/atoms/Forms/Textarea/Textarea'; + +export default styled(Button)` + height: 154px; +`; diff --git a/src/app/content/App/CreateNoticeScreen/index.tsx b/src/app/content/App/CreateNoticeScreen/index.tsx new file mode 100644 index 000000000..88cf21258 --- /dev/null +++ b/src/app/content/App/CreateNoticeScreen/index.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import Notification from 'components/organisms/Notification'; +import IntentionsSelector from 'components/molecules/IntentionsSelector/IntentionsSelector'; +import Input from 'components/atoms/Forms/Input/Input'; +import Textarea from './Textarea'; +import Error from 'components/atoms/Forms/Error/Error'; +import { CenterContainer, ContentWrapper } from 'components/atoms/'; +import BorderButton from 'components/atoms/Buttons/BorderButton'; + +interface Props { + close: () => void; +} +export const CreateNoticeScreen = ({ close }: Props) => ( + + + + + +