| | |
| | | import { concatenateResources } from "../util/resources" |
| | | import { classNames } from "../util/lang" |
| | | import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" |
| | | |
| | | type FlexConfig = { |
| | |
| | | const gap = config.gap ?? "1rem" |
| | | |
| | | return ( |
| | | <div style={`display: flex; flex-direction: ${direction}; flex-wrap: ${wrap}; gap: ${gap};`}> |
| | | <div |
| | | class={classNames(props.displayClass, "flex-component")} |
| | | style={`flex-direction: ${direction}; flex-wrap: ${wrap}; gap: ${gap};`} |
| | | > |
| | | {config.components.map((c) => { |
| | | const grow = c.grow ? 1 : 0 |
| | | const shrink = (c.shrink ?? true) ? 1 : 0 |