Files
bee-dashboard/src/pages/fdp/Horizontal.tsx
T
Cafe137 d0c94b7316 feat: add experimental fdp (#681)
* feat: add experimental fdp

* ci: update swarm-actions to v1

* fix: fix eslint violations

* refactor: decaf
2024-11-21 12:43:30 +01:00

23 lines
535 B
TypeScript

interface Props {
children: React.ReactNode
p?: string
gap?: number
between?: boolean
background?: string
}
export function Horizontal({ children, p = '0', gap = 8, between, background }: Props) {
const style = {
display: 'flex',
flexDirection: 'row' as 'row', //eslint-disable-line
alignItems: 'center',
justifyContent: between ? 'space-between' : 'flex-start',
gap: `${gap}px`,
padding: p,
background,
width: between ? '100%' : 'auto',
}
return <div style={style}>{children}</div>
}