UNPKG

aquameta-widget

Version:

Widget rendering framework built on top of Aquameta

25 lines (21 loc) 475 B
import html from '/db/widget/core/html.js'; import styled from '/db/widget/dep/styled-components.js'; const Parent = styled.div` display: table; height: ${({height}) => height || ''}; text-align: center; width: 100%; `; const Child = styled.div` display: table-cell; vertical-align: middle; `; export default function Centered(props) { return html` <${Parent} height=${props.height}> <${Child}> ${props.children} <//> <//> `; }