1
0
Fork 0
impress-2020/src/app/WardrobePage/support/Metadata.js
Matchu b23f64ad53 show DTI ID in item support drawer
helps make looking stuff up easier!
2020-08-14 22:01:04 -07:00

39 lines
722 B
JavaScript

import * as React from "react";
import { Box } from "@chakra-ui/core";
/**
* Metadata is a UI component for showing metadata about something, as labels
* and their values.
*/
function Metadata({ children }) {
return (
<Box
as="dl"
display="grid"
gridTemplateColumns="max-content auto"
gridRowGap="1"
gridColumnGap="2"
>
{children}
</Box>
);
}
function MetadataLabel({ children }) {
return (
<Box as="dt" gridColumn="1" fontWeight="bold">
{children}
</Box>
);
}
function MetadataValue({ children }) {
return (
<Box as="dd" gridColumn="2">
{children}
</Box>
);
}
export default Metadata;
export { MetadataLabel, MetadataValue };