mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-18 05:09:23 +00:00
homework 1: components
This commit is contained in:
15
src/components/ui/card/card.tsx
Normal file
15
src/components/ui/card/card.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ComponentPropsWithoutRef, forwardRef } from 'react'
|
||||
|
||||
import { clsx } from 'clsx'
|
||||
|
||||
import s from './card.module.scss'
|
||||
|
||||
export type CardProps = {} & ComponentPropsWithoutRef<'div'>
|
||||
|
||||
export const Card = forwardRef<HTMLDivElement, CardProps>(({ className, ...restProps }, ref) => {
|
||||
const classNames = {
|
||||
root: clsx(s.root, className),
|
||||
}
|
||||
|
||||
return <div ref={ref} className={classNames.root} {...restProps}></div>
|
||||
})
|
||||
Reference in New Issue
Block a user