| 1 |
import React from 'react' |
| 2 |
import classnames from 'classnames' |
| 3 |
import type { HTMLAttributes } from 'react' |
| 4 |
|
| 5 |
export interface ImportCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> { |
| 6 |
children: React.ReactNode |
| 7 |
className?: string |
| 8 |
variant?: 'default' | 'controls' |
| 9 |
} |
| 10 |
|
| 11 |
export const ImportCard = React.forwardRef<HTMLDivElement, ImportCardProps>(({ |
| 12 |
children, |
| 13 |
className, |
| 14 |
variant = 'default', |
| 15 |
style, |
| 16 |
...props |
| 17 |
}, ref) => { |
| 18 |
const cardStyle: React.CSSProperties = { |
| 19 |
backgroundColor: '#ffffff', |
| 20 |
padding: '25px', |
| 21 |
borderRadius: '5px', |
| 22 |
border: '1px solid #e0e0e0', |
| 23 |
marginBottom: '10px', |
| 24 |
width: '100%', |
| 25 |
...style |
| 26 |
} |
| 27 |
|
| 28 |
return ( |
| 29 |
<div |
| 30 |
ref={ref} |
| 31 |
className={classnames( |
| 32 |
{ |
| 33 |
'import-controls': variant === 'controls' |
| 34 |
}, |
| 35 |
className |
| 36 |
)} |
| 37 |
style={cardStyle} |
| 38 |
{...props} |
| 39 |
> |
| 40 |
{children} |
| 41 |
</div> |
| 42 |
) |
| 43 |
}) |
| 44 |
|
| 45 |
ImportCard.displayName = 'ImportCard' |
| 46 |
|