chore: add header component

This commit is contained in:
2023-12-28 12:27:18 +01:00
parent d12769107c
commit adf3ed2b62
6 changed files with 97 additions and 65 deletions

View File

@@ -8,7 +8,9 @@
"build": "tsc && vite build",
"preview": "vite preview",
"format": "prettier --write src",
"format:file": "prettier --write",
"lint": "eslint . --ext .jsx,.js,.tsx,.ts --no-error-on-unmatched-pattern --fix && stylelint --fix src/{,*/}*.{scss,css} --allow-empty-input",
"lint:file": "eslint --fix",
"storybook": "storybook dev -p 6006",
"sb": "storybook dev -p 6006",
"build-storybook": "storybook build"

View File

@@ -0,0 +1,17 @@
import type { Meta, StoryObj } from '@storybook/react'
import { Header } from './'
const meta = {
component: Header,
parameters: { layout: 'fullscreen' },
tags: ['autodocs'],
title: 'Components/Header',
} satisfies Meta<typeof Header>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {
args: {},
}

View File

@@ -0,0 +1,11 @@
import s from './header.module.scss'
export type HeaderProps = {
avatar?: string
name?: string
onLogout?: () => void
}
export const Header = ({}: HeaderProps) => {
return <div>Header</div>
}

View File

@@ -0,0 +1 @@
export * from './header'

View File

@@ -1,3 +1,4 @@
export * from './header'
export * from './button'
export * from './card'
export * from './typography'