From c28d51cdd459197813aab4f414764966ce8c6528 Mon Sep 17 00:00:00 2001 From: kwang Date: Fri, 28 Jun 2024 09:09:08 +0900 Subject: [PATCH] refactor/#25 Add color for toolbar click --- src/components/ui/Stack.tsx | 21 +++++++++++++++++++++ src/components/ui/ToolBar.tsx | 10 +--------- src/components/ui/ToolBarDetail.tsx | 4 +++- 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 src/components/ui/Stack.tsx diff --git a/src/components/ui/Stack.tsx b/src/components/ui/Stack.tsx new file mode 100644 index 0000000..756da94 --- /dev/null +++ b/src/components/ui/Stack.tsx @@ -0,0 +1,21 @@ +import { HTMLAttributes, PropsWithChildren } from 'react'; + +interface StackProps extends HTMLAttributes { + rotated?: boolean; +} + +export const VStack = (props: PropsWithChildren) => { + const { children, className = '', rotated, ...attributes } = props; + return ( +
+ {children} +
+ ); +}; +export const HStack = (props: PropsWithChildren) => + VStack({ ...props, rotated: !props.rotated }); + +export const Spacer = () =>
; diff --git a/src/components/ui/ToolBar.tsx b/src/components/ui/ToolBar.tsx index 8672fca..4c1a018 100644 --- a/src/components/ui/ToolBar.tsx +++ b/src/components/ui/ToolBar.tsx @@ -16,18 +16,10 @@ const ToolBar = ({ options = mockData }: ToolBarProps) => { return ( <>
- {/*
나의 사업장
*/} - {/*
캘린더
*/} - {/* - */} {options.map((option, idx) => (