Add Row, Col, and Spacer components

This commit is contained in:
jahooma 2021-12-10 00:12:02 -06:00
parent 7324a2f359
commit 7e6e7521b5
3 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,5 @@
export function Col(props: { children?: any; className?: string }) {
const { children, className } = props
return <div className={`${className} flex flex-col`}>{children}</div>
}

View File

@ -0,0 +1,5 @@
export function Row(props: { children?: any; className?: string }) {
const { children, className } = props
return <div className={`${className} flex flex-row`}>{children}</div>
}

View File

@ -0,0 +1,8 @@
export function Spacer(props: { w?: number; h?: number }) {
const { w, h } = props
const width = w === undefined ? undefined : w * 0.25 + 'rem'
const height = h === undefined ? undefined : h * 0.25 + 'rem'
return <div style={{ width, height, flexShrink: 0 }} />
}