16 lines
514 B
TypeScript
16 lines
514 B
TypeScript
import { Multilingual } from "@/data";
|
|
import React from "react";
|
|
import { Chip } from "@material-ui/core";
|
|
|
|
export type MultilingualCellProps = { value: Multilingual<React.ReactNode> }
|
|
|
|
export const MultilingualCell = ({ value }: MultilingualCellProps) => {
|
|
return <>
|
|
{ Object.keys(value).map(language => <div>
|
|
<Chip size="small" label={ language.toUpperCase() } style={ { marginRight: "0.5rem" } }/>
|
|
{ value[language as keyof Multilingual<any>] }
|
|
</div>) }
|
|
</>
|
|
}
|
|
|