Skip to content

Commit

Permalink
Merge pull request #65 from TEAM-BEAT/feat/#64/Spacing
Browse files Browse the repository at this point in the history
[Feat/#64] 공통 Spacing 컴포넌트 추가
  • Loading branch information
pepperdad authored Jul 9, 2024
2 parents 2c767b3 + 86a8706 commit ae6cd5d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
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

0 comments on commit ae6cd5d

Please sign in to comment.