diff --git a/src/assets/icon/BackPush.svg b/src/assets/icon/BackPush.svg index dae901ba..8f347d10 100644 --- a/src/assets/icon/BackPush.svg +++ b/src/assets/icon/BackPush.svg @@ -1,3 +1,3 @@ - - + + diff --git a/src/components/common/button/Button.tsx b/src/components/common/button/Button.tsx index 6b3adb89..f99c2f0a 100644 --- a/src/components/common/button/Button.tsx +++ b/src/components/common/button/Button.tsx @@ -72,6 +72,21 @@ const Button = ({ : '' } ${FONT_STYLE['NSK']} + ${ + buttonType === 'Plain-blue' + ? 'hover:bg-blue-500 hover:text-white-0 focus:bg-blue-500 focus:text-white-0 focus:outline-none' + : '' + } + ${ + buttonType === 'Plain-red' + ? 'hover:bg-red-400 hover:text-white-0 foucs: bg-red-400 focus:text-white-0' + : '' + } + ${ + buttonType === 'Round-blue-500' + ? 'hover:bg-blue-700 hover:text-white-0 focus:bg-blue-700 focus:text-white-0 focus:outline-none' + : '' + } ` return (
+ {label} +
+ ) +} + +export default Chips diff --git a/src/components/common/header/Header.tsx b/src/components/common/header/Header.tsx index 636b406e..b6abc23e 100644 --- a/src/components/common/header/Header.tsx +++ b/src/components/common/header/Header.tsx @@ -76,6 +76,20 @@ const Header = ({ {pageTitle} + ) : headerType === 'Map' ? ( + <> +
+ navigate('/')} + /> + + {pageTitle} + +
+
+ ) : ( '' )} diff --git a/src/components/common/header/HeaderType.ts b/src/components/common/header/HeaderType.ts index 49f9b3fd..cd5be39b 100644 --- a/src/components/common/header/HeaderType.ts +++ b/src/components/common/header/HeaderType.ts @@ -1,6 +1,6 @@ import { ReactNode } from 'react' -type HeaderType = 'BackPush' | 'Logo' | 'Close' | 'CloseWithTitle' +type HeaderType = 'BackPush' | 'Logo' | 'Close' | 'CloseWithTitle' | 'Map' export interface HeaderProps { headerType: HeaderType pageTitle?: string diff --git a/src/components/common/icon/Icon.tsx b/src/components/common/icon/Icon.tsx index 08ba4a90..ac009b0b 100644 --- a/src/components/common/icon/Icon.tsx +++ b/src/components/common/icon/Icon.tsx @@ -2,12 +2,15 @@ import Icons from './Icons' export type IconType = keyof typeof Icons export interface IconProps { - icon: IconType + icon?: IconType classStyle?: string onClick?: () => void } const Icon = ({ icon, classStyle, onClick }: IconProps) => { + if (!icon) { + return null + } const SvgIcon = Icons[icon] return } diff --git a/src/components/common/standardButton/StandardButton.stories.tsx b/src/components/common/standardButton/StandardButton.stories.tsx new file mode 100644 index 00000000..33d912be --- /dev/null +++ b/src/components/common/standardButton/StandardButton.stories.tsx @@ -0,0 +1,29 @@ +import type { Meta, StoryObj } from '@storybook/react' +import StandardButton from './StandardButton' + +const meta: Meta = { + component: StandardButton, + tags: ['autodocs'], + title: 'components/StandardButton', + argTypes: { + label: { + control: 'text' + }, + state: { + control: 'select', + options: ['disabled', 'enabled'] + }, + style: { + control: 'select', + options: ['outlined', 'filled'] + } + } +} +export default meta +type Story = StoryObj + +export const Default: Story = { + render: (args) => ( + + ) +} diff --git a/src/components/common/standardButton/StandardButton.tsx b/src/components/common/standardButton/StandardButton.tsx new file mode 100644 index 00000000..641b64a1 --- /dev/null +++ b/src/components/common/standardButton/StandardButton.tsx @@ -0,0 +1,25 @@ +interface StandardButtonProps { + label: string + state: 'disabled' | 'enabled' + style: 'outlined' | 'filled' +} +const StandardButton = ({ label, state, style }: StandardButtonProps) => { + return ( +
+ {label} +
+ ) +} + +export default StandardButton diff --git a/src/components/common/toast/index.tsx b/src/components/common/toast/index.tsx index e1bb0bd8..03b2a0b2 100644 --- a/src/components/common/toast/index.tsx +++ b/src/components/common/toast/index.tsx @@ -3,7 +3,7 @@ const Toast = () => { return ( = { + component: TopNavigation, + tags: ['autodocs'], + title: 'components/TopNavigation', + argTypes: { + title: { + control: 'text' + }, + type: { + control: 'select', + options: ['left', 'center'] + }, + icon1: { + control: 'select', + options: iconNames + }, + icon2: { + control: 'select', + options: iconNames + }, + icon3: { + control: 'select', + options: iconNames + } + // icon1: { + // control: 'select', + // options: ['SideBar', 'Alarm', undefined] + // }, + // icon2: { + // control: 'select', + // options: ['SideBar', 'Alarm', undefined] + // }, + // icon3: { + // control: 'select', + // options: ['SideBar', 'Alarm', undefined] + // } + } +} + +export default meta +type Story = StoryObj + +export const Default: Story = { + render: (args) => ( + + ) +} diff --git a/src/components/common/topNavigation/TopNavigation.tsx b/src/components/common/topNavigation/TopNavigation.tsx new file mode 100644 index 00000000..96d107f7 --- /dev/null +++ b/src/components/common/topNavigation/TopNavigation.tsx @@ -0,0 +1,44 @@ +import Icon, { IconType } from '../icon/Icon' + +interface TopNavigationProps { + title: string + type: 'left' | 'center' + // icon1: 'SideBar' | 'Alarm' | undefined + // icon2: 'SideBar' | 'Alarm' | undefined + // icon3: 'SideBar' | 'Alarm' | undefined + icon1: IconType | undefined + icon2: IconType | undefined + icon3: IconType | undefined +} +const TopNavigation = ({ + title, + type, + icon1, + icon2, + icon3 +}: TopNavigationProps) => { + return ( +
+ + {type === 'left' ? ( + <> +
{title}
+
+ + + +
+ + ) : ( +
+ {title} +
+ )} + {/*
{title}
*/} +
+ ) +} + +export default TopNavigation diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 1f524e98..b01917b6 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -99,7 +99,7 @@ export const router = createBrowserRouter( path: 'map', element: ( <> -
+
) diff --git a/tailwind.config.js b/tailwind.config.js index efaae3e2..3b8a4d79 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -47,7 +47,7 @@ export default { r200: 'rgba(244,244,244,1)' }, gray: { - 5: '#F2F2F2', + 5: '#F7F7F7', 10: '#E4E4E4', 20: '#D4D3D3', 30: '#C7C7C7',