move move frontend to progress-test
This commit is contained in:
23
app/javascript/components/Card/Card.tsx
Normal file
23
app/javascript/components/Card/Card.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React, { FC } from "react";
|
||||
|
||||
type Props = {
|
||||
title: string
|
||||
action?: () => void
|
||||
children: any
|
||||
className?: string
|
||||
}
|
||||
export const Card: FC<Props> = ({
|
||||
title, action, children, className = '',
|
||||
}) => (
|
||||
<div className={`bg-white md:rounded shadow-sm border border-gray-300 w-full ${className}`}>
|
||||
<div className="border-b border-gray-300 bg-gray-100 md:rounded-t p-2 shadow-sm flex items-center">
|
||||
<span className="text-lg text-gray-800 flex-grow">{title}</span>
|
||||
{
|
||||
action ? action() : null
|
||||
}
|
||||
</div>
|
||||
<div className="p-4 h-full">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
Reference in New Issue
Block a user