File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @badrap/libapp " : patch
3+ ---
4+
5+ Add TextBlock component
Original file line number Diff line number Diff line change 1+ import { type Responsive , type UiNode , element } from "../internal.ts" ;
2+
3+ type TextBlockProps = {
4+ /**
5+ * Horizontal text alignment. Can be responsive.
6+ * Inherited from surrounding context if not explicitly set.
7+ */
8+ align ?: Responsive < "left" | "center" | "right" > ;
9+ /**
10+ * Maximum number of lines to display before truncating. Can be responsive.
11+ */
12+ maxLines ?: Responsive < number > ;
13+ /**
14+ * When true, reduces the text emphasis by applying a lower-intensity color variant.
15+ */
16+ muted ?: boolean ;
17+ /**
18+ * The content to be displayed. Can be a string or more complex UI elements.
19+ */
20+ children ?: UiNode ;
21+ } ;
22+
23+ /**
24+ * A component for rendering block-level text content.
25+ * Color is inherited from the surrounding context.
26+ */
27+ export function TextBlock ( props : TextBlockProps ) : UiNode {
28+ return element ( "ui-text-block" , props ) ;
29+ }
Original file line number Diff line number Diff line change @@ -21,5 +21,6 @@ export { RelativeTime } from "./RelativeTime.ts";
2121export { Select } from "./Select.ts" ;
2222export { Switch } from "./Switch.ts" ;
2323export { Text } from "./Text.ts" ;
24+ export { TextBlock } from "./TextBlock.ts" ;
2425export { TextField } from "./TextField.ts" ;
2526export { UploadButton } from "./UploadButton.ts" ;
You can’t perform that action at this time.
0 commit comments