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

[Feat/#64] 공통 Spacing 컴포넌트 추가 #65

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions src/components/commons/spacing/Spacing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styled from "styled-components";

interface SpacingPropTypes {
marginBottom: string;
}

const Spacing = ({ marginBottom }: SpacingPropTypes) => {
return <SpacingBox $marginBottom={marginBottom} />;
};

export default Spacing;

const SpacingBox = styled.div<{ $marginBottom: string }>`
margin-bottom: ${(props) => props.$marginBottom || "0"}rem;
`;
2 changes: 2 additions & 0 deletions src/pages/test/TestPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { IconTextfiedlDelete } from "@assets/svgs";
import Chip from "@components/commons/chip/Chip";
import TextArea from "@components/commons/input/textArea/TextArea";
import TextField from "@components/commons/input/textField/TextField";
import Spacing from "@components/commons/spacing/Spacing";
import Stepper from "@components/commons/stepper/Stepper";
import { useState } from "react";

Expand Down Expand Up @@ -47,6 +48,7 @@ const TestPage = () => {
/>
<Chip label="테스트" />
</div>
<Spacing marginBottom="3" />
<Stepper max={3} round={round} onMinusClick={onMinusClick} onPlusClick={onPlusClick} />
</div>
);
Expand Down
Loading