feat: create Card component wrapper
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
.card {
|
||||
padding: 16px;
|
||||
border-radius: 4px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import './card.scss'
|
||||
|
||||
export interface CardProps {
|
||||
className?: string
|
||||
children: React.ReactNode
|
||||
'data-testid'?: string
|
||||
}
|
||||
|
||||
export const Card: React.FC<CardProps> = ({ className, children, 'data-testid': dataTestId }) => {
|
||||
return (
|
||||
<section className={`card ${className || ''}`} data-testid={dataTestId}>
|
||||
{children}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export { Card } from './card'
|
||||
export type { CardProps } from './card'
|
||||
Reference in New Issue
Block a user