mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-20 12:33:26 +00:00
feat: layout component
This commit is contained in:
16
src/components/layout/layout.tsx
Normal file
16
src/components/layout/layout.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
import { Header, HeaderProps } from '@/components'
|
||||
|
||||
import s from './layout.module.scss'
|
||||
|
||||
export type LayoutProps = { children: ReactNode } & HeaderProps
|
||||
|
||||
export const Layout = ({ children, ...headerProps }: LayoutProps) => {
|
||||
return (
|
||||
<div className={s.layout}>
|
||||
<Header {...headerProps} />
|
||||
<div className={s.content}>{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user