Adding a Cartouche for the card component
This commit is contained in:
21
gui/rpk-gui/src/components/Cartouche.tsx
Normal file
21
gui/rpk-gui/src/components/Cartouche.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { useTranslation } from "@refinedev/core";
|
||||
|
||||
type CartoucheProps = {
|
||||
record: any
|
||||
}
|
||||
|
||||
const Cartouche = (props: CartoucheProps) => {
|
||||
const { record } = props;
|
||||
const { translate: t } = useTranslation();
|
||||
return (
|
||||
<>
|
||||
<h2>{record.label}</h2>
|
||||
<ul>
|
||||
{ record.created_at && <li>{t("resource.created_at")}: {record.created_at} {t("resource.created_at")}: {record.created_by}</li> }
|
||||
{ record.updated_at && <li>{t("resource.updated_at")}: {record.updated_at} {t("resource.updated_by")}: {record.updated_by}</li> }
|
||||
</ul>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Cartouche;
|
||||
Reference in New Issue
Block a user