Created
February 21, 2020 14:03
-
-
Save isabellachen/3c448133f411f30b32a0e1a5d4b77428 to your computer and use it in GitHub Desktop.
generic component props
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PropsWithChildren } from 'react'; | |
export type GenericComponentProps = PropsWithChildren<Record<string, any>>; | |
const MetaBox = (props: GenericComponentProps) => ( | |
<div className="metainfo__box"> | |
<div>{t(`entityDetail.${props.label}`)}</div> | |
<div>{props.children}</div> | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment