Add Row, Col, and Spacer components
This commit is contained in:
parent
7324a2f359
commit
7e6e7521b5
5
web/components/layout/col.tsx
Normal file
5
web/components/layout/col.tsx
Normal 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>
|
||||
}
|
5
web/components/layout/row.tsx
Normal file
5
web/components/layout/row.tsx
Normal 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>
|
||||
}
|
8
web/components/layout/spacer.tsx
Normal file
8
web/components/layout/spacer.tsx
Normal 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 }} />
|
||||
}
|
Loading…
Reference in New Issue
Block a user