Files
animethemes-web/src/components/description-list/DescriptionList.js
T
Manuel S 31aee782b0 feat: Migrated to Next.js (#87)
* Rewrote data layer to work on-demand.
* Added several favicon formats.
* Added image for SEO page previews.
* Disabled GitHub pages as it no longer works.
* Several other adjustments.
2022-01-16 04:09:29 +01:00

40 lines
845 B
JavaScript

import styled from "styled-components";
import { Text } from "components/text";
const StyledDescriptionList = styled.dl`
display: flex;
flex-direction: column;
align-items: center;
margin: 0;
`;
const StyledKey = styled.dt`
margin: 0 0 0.25rem 0;
`;
const StyledValue = styled.dd`
margin: 0;
&:not(:last-child) {
margin-bottom: 1.5rem;
}
`;
export function DescriptionList({ children, ...props }) {
return (
<StyledDescriptionList {...props}>
{children}
</StyledDescriptionList>
);
}
DescriptionList.Item = function DescriptionListItem({ title, children }) {
return (
<>
<StyledKey>
<Text as="span" variant="h2">{title}</Text>
</StyledKey>
<StyledValue>{children}</StyledValue>
</>
);
};