// // Copyright 2026 DXOS.org // import React from 'react'; import { recipes } from '../../recipes.ts'; import { composable, composableProps } from '../../util/slots.ts'; export type BlockProps = { /** Places the block in a parent Container's start or end gutter. */ rail?: 'start' | 'end'; /** Keeps the block's width but takes its content's height, for a slot in a row shorter than a block. */ compact?: boolean; }; /** A block-sized square that centres its content (typically an Icon); `compact` drops the fixed height. */ export const Block = composable(({ children, rail, compact, ...props }, forwardedRef) => { const { className, ...rest } = composableProps(props, { classNames: recipes.block() }); return (
{children}
); }); Block.displayName = 'Block';