Indent
Create an indented block of source text. The indented block starts a new line
at the new indentation level and, with trailingBreak
, ends with a new line
after restoring the indentation level. The default line break is a hard line
break suitable for typical blocks of statements but can be configured.
import { Indent } from "@alloy-js/core";
<Indent hardline line nobreak softline trailingBreak> {children}</Indent>
import { Indent } from "@alloy-js/core/stc";
Indent({ hardline: boolean, line: boolean, nobreak: boolean, softline: boolean, trailingBreak: boolean,}).children(children)
Props
children | Children |
hardline | optionalboolean Use a hard line ( |
line | optionalboolean Use a regular line ( |
nobreak | optionalboolean Don’t include a line break. The new indentation level will start after the first linebreak within the children. |
softline | optionalboolean Use a soft line ( |
trailingBreak | optionalboolean Place the configured line break at the end of the block after restoring the indentation level. |