Rounded blocks read as UI; every layout builds out of this one primitive.
(props: {
readonly x: number;
readonly y: number;
readonly width: number;
readonly height: number;
readonly className?: string;
})
| 98 | |
| 99 | /** Rounded blocks read as UI; every layout builds out of this one primitive. */ |
| 100 | function Block(props: { |
| 101 | readonly x: number; |
| 102 | readonly y: number; |
| 103 | readonly width: number; |
| 104 | readonly height: number; |
| 105 | readonly className?: string; |
| 106 | }) { |
| 107 | return ( |
| 108 | <rect |
| 109 | x={props.x} |
| 110 | y={props.y} |
| 111 | width={props.width} |
| 112 | height={props.height} |
| 113 | rx={2} |
| 114 | className={cn("fill-muted-foreground/20", props.className)} |
| 115 | /> |
| 116 | ); |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * The header every artifact has: a title bar and a couple of controls. |