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)| children | Children | |
| hardline | optional boolean | Use a hard line (<hbr />) to start (and optionally end with trailingBreak) the new indentation level. |
| line | optional boolean | Use a regular line (<br />) to start (and optionally end with trailingBreak) the new indentation level. |
| nobreak | optional boolean | Don’t include a line break. The new indentation level will start after the first linebreak within the children. |
| softline | optional boolean | Use a soft line (<sbr />) to start (and optionally end with trailingBreak) the new indentation level. |
| trailingBreak | optional boolean | Place the configured line break at the end of the block after restoring the indentation level. |