mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-16 12:33:18 +00:00
chore: add header component
This commit is contained in:
@@ -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"
|
||||
|
||||
0
src/components/ui/header/header.module.scss
Normal file
0
src/components/ui/header/header.module.scss
Normal file
17
src/components/ui/header/header.stories.tsx
Normal file
17
src/components/ui/header/header.stories.tsx
Normal 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: {},
|
||||
}
|
||||
11
src/components/ui/header/header.tsx
Normal file
11
src/components/ui/header/header.tsx
Normal 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>
|
||||
}
|
||||
1
src/components/ui/header/index.ts
Normal file
1
src/components/ui/header/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './header'
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './header'
|
||||
export * from './button'
|
||||
export * from './card'
|
||||
export * from './typography'
|
||||
|
||||
Reference in New Issue
Block a user