Skip to content
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
8 changes: 8 additions & 0 deletions src/app/delete-account/delete-account.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ export const fixedButtonWrapper = style({

padding: "0 2rem",
});

export const deleteButton = style({
flex: 1,
});

export const continueButton = style({
flex: 2,
});
6 changes: 4 additions & 2 deletions src/app/delete-account/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ export default function page() {
</article>

<div className={styles.fixedButtonWrapper}>
<Button onClick={handleClickDeleteAccount}>탈퇴하기</Button>
<Button>계속 이용하기</Button>
<Button className={styles.deleteButton} outlined onClick={handleClickDeleteAccount}>
탈퇴하기
</Button>
<Button className={styles.continueButton}>계속 이용하기</Button>
</div>
</>
);
Expand Down
7 changes: 4 additions & 3 deletions src/components/Common/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { type ButtonHTMLAttributes, ReactNode, memo } from "react";

import clsx from "clsx";
import { buttonStyle } from "./button.css";
import { buttonStyle, outlinedStyle } from "./button.css";

interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
children: ReactNode;
outlined?: boolean;
}

function Button({ children, className, ...buttonElementProps }: ButtonProps) {
function Button({ children, className, outlined, ...buttonElementProps }: ButtonProps) {
return (
<button className={clsx(buttonStyle, className)} {...buttonElementProps}>
<button className={clsx(buttonStyle, outlined && outlinedStyle, className)} {...buttonElementProps}>
{children}
</button>
);
Expand Down
10 changes: 8 additions & 2 deletions src/components/Common/Button/button.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { style } from '@vanilla-extract/css';
import { style } from "@vanilla-extract/css";
import { vars } from "@/styles/theme.css";

export const buttonStyle = style({
Expand All @@ -18,4 +18,10 @@ export const buttonStyle = style({
color: vars.color.grey_6,
},
},
});
});

export const outlinedStyle = style({
background: vars.color.white,
boxShadow: `inset 0 0 0 1px ${vars.color.grey_4}`,
color: vars.color.grey_6,
});