Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/parent home #108

Merged
merged 13 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/assets/borders/username-underline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/common/InputForm.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import ContractInputForm from './InputForm';

export default {
title: 'Common/InputForm',
title: 'common/InputForm',
component: ContractInputForm,
} as ComponentMeta<typeof ContractInputForm>;

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Receipt.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import Receipt from './Receipt';

export default {
title: 'Common/Receipt',
title: 'common/Receipt',
component: Receipt,
argTypes: {
onSubmit: { action: 'handle click' },
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/badges/InstructionBadge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import InstructionBadge from './InstructionBadge';

export default {
title: 'Common/๋ฑƒ์ง€/InstructionBadge',
title: 'common/badges/InstructionBadge',
component: InstructionBadge,
} as ComponentMeta<typeof InstructionBadge>;

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/badges/InterestBadge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import InterestBadge from './InterestBadge';

export default {
title: 'Common/๋ฑƒ์ง€/InterestBadge',
title: 'common/badges/InterestBadge',
component: InterestBadge,
} as ComponentMeta<typeof InterestBadge>;

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/badges/LevelBadge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import LevelBadge from './LevelBadge';

export default {
title: 'Common/๋ฑƒ์ง€/LevelBadge',
title: 'common/badges/LevelBadge',
component: LevelBadge,
} as ComponentMeta<typeof LevelBadge>;

Expand Down
8 changes: 5 additions & 3 deletions src/components/common/badges/LevelBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import styled, { css } from 'styled-components';

interface LevelBadgeProps {
/** ๋ ˆ๋ฒจ์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค. */
level: TLevel | null;
level: TLevel;
}

function LevelBadge({ level }: LevelBadgeProps) {
function renderText(level: TLevel) {
function renderTextByLevel(level: TLevel) {
if (level === 1) {
return 'Lv.1 ๋ฑ…ํ‚คํ•™';
} else if (level === 2) {
Expand All @@ -22,7 +22,9 @@ function LevelBadge({ level }: LevelBadgeProps) {
}
return (
<Wrapper>
<StyledSpan level={level as TLevel}>{renderText(level!)}</StyledSpan>
<StyledSpan level={level as TLevel}>
{renderTextByLevel(level!)}
</StyledSpan>
</Wrapper>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/badges/RiskBadge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import RiskBadge from './RiskBadge';

export default {
title: 'Common/๋ฑƒ์ง€/RiskBadge',
title: 'common/badges/RiskBadge',
component: RiskBadge,
} as ComponentMeta<typeof RiskBadge>;

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/badges/SuggestBadge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import SuggestBadge from './SuggestBadge';

export default {
title: 'Common/๋ฑƒ์ง€/SuggestBadge',
title: 'common/badges/SuggestBadge',
component: SuggestBadge,
} as ComponentMeta<typeof SuggestBadge>;

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/bottomSheets/CommonSheet.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import SelectProfile from './sheetContents/SelectProfile';
import SheetCompleted from './sheetContents/SheetCompleted';

export default {
title: 'Common/๋ฐ”ํ…€ ์‹œํŠธ/CommonSheet',
title: 'common/bottomSheets/CommonSheet',
component: CommonSheet,
argTypes: {},
} as ComponentMeta<typeof CommonSheet>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Signature from './sheetContents/Signature';
import RangeInput from './sheetContents/RangeInput';

export default {
title: 'Common/๋ฐ”ํ…€ ์‹œํŠธ/ContractSheet',
title: 'common/bottomSheets/ContractSheet',
component: ContractSheet,
argTypes: {},
} as ComponentMeta<typeof ContractSheet>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/buttons/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Button from './Button';

// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
export default {
title: 'Common/๋ฒ„ํŠผ/Button',
title: 'common/buttons/Button',
component: Button,
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
argTypes: { onClick: { action: 'event' } },
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/buttons/ButtonSet.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Button from './Button';
import ButtonSet from './ButtonSet';

export default {
title: 'Common/๋ฒ„ํŠผ ์…‹/ButtonSet',
title: 'common/buttons/ButtonSet',
component: ButtonSet,
argTypes: {},
} as ComponentMeta<typeof ButtonSet>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/buttons/CheckButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import CheckButton from './CheckButton';

export default {
title: 'Common/๋ฒ„ํŠผ/CheckButton',
title: 'common/buttons/CheckButton',
component: CheckButton,
argTypes: {
onClick: { action: 'handle click' },
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/buttons/CloseButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import CloseButton from './CloseButton';

export default {
title: 'Common/๋ฒ„ํŠผ/CloseButton',
title: 'common/buttons/CloseButton',
component: CloseButton,
argTypes: {
onClick: { action: 'handle click' },
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/buttons/RoleButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import RoleButton from './RoleButton';

export default {
title: 'Common/๋ฒ„ํŠผ/RoleButton',
title: 'common/buttons/RoleButton',
component: RoleButton,
argTypes: {
onClick: { action: 'handle click' },
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/buttons/SheetButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import SheetButton from './SheetButton';

export default {
title: 'Common/๋ฒ„ํŠผ/SheetButton',
title: 'common/buttons/SheetButton',
component: SheetButton,
decorators: [(Story) => <Story />],
} as ComponentMeta<typeof SheetButton>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/modals/PrimaryModal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import PrimaryModal from './PrimaryModal';

export default {
title: 'Common/๋ชจ๋‹ฌ/PrimaryModal',
title: 'common/modals/PrimaryModal',
component: PrimaryModal,
argTypes: {
onSubmit: { action: 'handle click' },
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/modals/PrimaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ function PrimaryModal({
<span className="header">{headerText}</span>
<span className="body">{bodyText}</span>
</WhiteBox>
<CheckButtonPositioner>
<CheckButtonWrapper>
<CheckButton onClick={handleSubmit} />
</CheckButtonPositioner>
</CheckButtonWrapper>
</Content>
</ReactModal>
);
Expand Down Expand Up @@ -136,7 +136,7 @@ const WhiteBox = styled.div`
}
`;

const CheckButtonPositioner = styled.div`
const CheckButtonWrapper = styled.div`
margin-top: 16px;
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/modals/QuinaryModal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import QuinaryModal from './QuinaryModal';

export default {
title: 'Common/๋ชจ๋‹ฌ/QuinaryModal',
title: 'common/modals/QuinaryModal',
component: QuinaryModal,
argTypes: {
onSubmit: { action: 'handle click' },
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/modals/QuinaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ function QuinaryModal({
<SignatureWrapper>Signature</SignatureWrapper>
</Bottom>
<PerforatedLineBottom fill={theme.palette.greyScale.white} />
<CheckButtonPositioner>
<CheckButtonWrapper>
<CheckButton onClick={handleSubmit} />
</CheckButtonPositioner>
</CheckButtonWrapper>
</Content>
</ReactModal>
);
Expand Down Expand Up @@ -450,7 +450,7 @@ const SignatureWrapper = styled.div`
align-items: center;
`;

const CheckButtonPositioner = styled.div`
const CheckButtonWrapper = styled.div`
margin-top: 16px;
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/common/modals/SecondaryModal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import SecondaryModal from './SecondaryModal';

export default {
title: 'Common/๋ชจ๋‹ฌ/SecondaryModal',
title: 'common/modals/SecondaryModal',
component: SecondaryModal,
argTypes: {
onSubmit: { action: 'handle click' },
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/modals/SecondaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ function SecondaryModal({
<span className="header">{headerText}</span>
<div className="body">{bodyText}</div>
</WhiteBox>
<CheckButtonPositioner>
<CheckButtonWrapper>
<CheckButton onClick={handleSubmit} />
</CheckButtonPositioner>
</CheckButtonWrapper>
</Content>
</ReactModal>
);
Expand Down Expand Up @@ -156,6 +156,6 @@ const WhiteBox = styled.div`
}
`;

const CheckButtonPositioner = styled.div`
const CheckButtonWrapper = styled.div`
margin-top: 16px;
`;
2 changes: 1 addition & 1 deletion src/components/common/modals/SenaryModal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import SenaryModal from './SenaryModal';

export default {
title: 'Common/๋ชจ๋‹ฌ/SenaryModal',
title: 'common/modals/SenaryModal',
component: SenaryModal,
argTypes: {
onSubmit: { action: 'handle click' },
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/modals/SenaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ function SenaryModal({
<div className="body">{comment}</div>
</Comment>
<PerforatedLineBottom fill={theme.palette.greyScale.white} />
<CheckButtonPositioner>
<CheckButtonWrapper>
<Button
onClick={handleSubmit}
property="default"
label="์‚ญ์ œํ•˜๊ธฐ"
fixed
/>
</CheckButtonPositioner>
</CheckButtonWrapper>
</Content>
</ReactModal>
);
Expand Down Expand Up @@ -513,7 +513,7 @@ const Comment = styled.div`
}
`;

const CheckButtonPositioner = styled.div`
const CheckButtonWrapper = styled.div`
margin-top: 16px;
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import QuaternaryModal from './QuaternaryModal';

export default {
title: 'Common/๋ชจ๋‹ฌ/QuaternaryModal',
title: 'common/modals/QuaternaryModal',
component: QuaternaryModal,
argTypes: {
onSubmit: { action: 'handle click' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function QuaternaryModal({
<SignatureWrapper>Signature</SignatureWrapper>
</Bottom>
<PerforatedLineBottom fill={theme.palette.greyScale.white} />
<ButtonPositioner>
<ButtonWrapper>
{isKid === true ? (
<CheckButton onClick={handleCheckButtonClick} />
) : (
Expand All @@ -188,7 +188,7 @@ function QuaternaryModal({
/>
</DoubleButtonWrapper>
)}
</ButtonPositioner>
</ButtonWrapper>
width: 100%; ;
</Content>
</ReactModal>
Expand Down Expand Up @@ -484,7 +484,7 @@ const SignatureWrapper = styled.div`
align-items: center;
`;

const ButtonPositioner = styled.div`
const ButtonWrapper = styled.div`
width: 100%;
margin-top: 16px;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function InstructionCard({
<>
<YellowBox currentCardIdx={currentCardIdx}>{children}</YellowBox>
<WhiteBox>
<div className="text-positioner">
<div className="text-wrapper">
<span className="header">{headerText}</span>
<p className="body">{bodyText}</p>
</div>
Expand Down Expand Up @@ -60,7 +60,7 @@ const WhiteBox = styled.div`
justify-content: flex-start;
align-items: center;

.text-positioner {
.text-wrapper {
margin-top: 24px;
gap: 24px;
padding: 0px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
import TertiaryModal from './TertiaryModal';

export default {
title: 'Common/๋ชจ๋‹ฌ/TertiaryModal',
title: 'common/modals/TertiaryModal',
component: TertiaryModal,
argTypes: {
onSubmit: { action: 'handle click' },
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/modals/tertiaryModal/TertiaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ function TertiaryModal({ onSubmit }: TertiaryProps) {
</InstructionCard>
</SwiperSlide>
</StyledSwiper>
<CloseButtonPositioner>
<CloseButtonWrapper>
<CloseButton onClick={handleSubmit} />
</CloseButtonPositioner>
</CloseButtonWrapper>
</Content>
</ReactModal>
);
Expand Down Expand Up @@ -199,6 +199,6 @@ const StyledSwiper = styled(Swiper)`
height: 504px;
`;

const CloseButtonPositioner = styled.div`
const CloseButtonWrapper = styled.div`
margin-top: 16px;
`;
Loading