Skip to content

Commit

Permalink
fix: remove duplicate borders
Browse files Browse the repository at this point in the history
  • Loading branch information
yumincho committed Mar 6, 2024
1 parent eaf5890 commit 9e34cdd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 27 deletions.
12 changes: 9 additions & 3 deletions packages/web/src/components/atoms/Divider.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import { css } from "@emotion/react";
import styled from "@emotion/styled";
import type { Color } from "@biseo/web/theme";

export const Divider = styled.hr<{
dir?: "horizontal" | "vertical";
color?: Color;
}>(
({ dir = "horizontal", theme }) => css`
({ dir = "horizontal", color = "gray300", theme }) => css`
border: none;
${dir === "horizontal"
? css`
width: 100%;
border-bottom: 1px solid ${theme.colors.gray300};
height: 1px;
border: none;
background-color: ${theme.colors[color]};
`
: css`
width: 1px;
height: 100%;
border-right: 1px solid ${theme.colors.gray300};
border: none;
background-color: ${theme.colors[color]};
`}
`,
);
55 changes: 31 additions & 24 deletions packages/web/src/components/molecules/ModalInnerTextBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,24 @@ import {
Button,
Clickable,
TaggersBox,
Divider,
} from "@biseo/web/components/atoms";
import "@biseo/web/components/atoms/placeholder.css";
import { TrashIcon } from "@biseo/web/assets";
import { css } from "@emotion/react";
import { scroll, scrollBar } from "@biseo/web/styles";
import {
w,
h,
padding,
scroll,
scrollBar,
bg,
align,
column,
gap,
border,
round,
} from "@biseo/web/styles";

interface ModalInnerProps extends PropsWithChildren {
title: string;
Expand Down Expand Up @@ -185,11 +198,8 @@ const TextButton: React.FC<SubmitProps> = ({
}) => (
<BorderedBox
w={300}
borderColor="gray200"
bg="gray100"
borderSize={1}
roundBot={5}
roundTop={0}
borderStyle="solid"
dir="row"
align="center"
Expand Down Expand Up @@ -269,30 +279,27 @@ const AddVoteOptionArea: React.FC<SubmitProps> = ({
onClick,
onSubmit,
}) => (
<Box w={300}>
<BorderedBox
borderColor="gray200"
bg="white"
w="fill"
h={152}
borderSize={1}
pad={10}
padRight={0}
roundBot={0}
roundTop={5}
borderStyle="solid"
align="stretch"
<div css={[w(300), border.gray200, round.md, `overflow: hidden`]}>
<div
css={[
bg.white,
w("fill"),
h(152),
padding(10),
column,
align.stretch,
scroll.y,
scrollBar,
gap(10),
]}
>
<Scroll>
<Box w="fill" gap={10}>
{children}
</Box>
</Scroll>
</BorderedBox>
{children}
</div>
<Divider color="gray200" />
<TextButton onClick={onClick} onSubmit={onSubmit} value={value}>
새로운 항목
</TextButton>
</Box>
</div>
);
ModalInner.AddVoteOptionArea = AddVoteOptionArea;

Expand Down

0 comments on commit 9e34cdd

Please sign in to comment.