Omit
Renders nothing when the flag is true — the negative form of a guard.
@stellaria/nebula-webOmitPropsPreview
Omit renders children unless omit is true. Pure logic, server-safe, no DOM.
Why it exists next to Conditional
It is the negative form, and it exists because that is how the consuming apps already read:
omit={!canEdit} next to a block that should disappear. Keeping the prop name makes the migration
from the seed codebase one-to-one, with no conditions rewritten — and a rewritten condition is where
a permission bug is born.
About the name
Omit collides with TypeScript's Omit<> utility, but only in the value space of the module that
imports it: the type still resolves. If the clash bothers you in a given file, alias the import.
Props
2| Prop | Type | Default |
|---|---|---|
children What renders while it is kept. Nothing takes its place when omitted: this is a removal, not a swap, and there is no fallback branch by design. | ReactNode | — |
omit Removes the children when true. It is the inverse of a guard — the flag names what to drop, not what to keep — so leaving it out renders them. | boolean | false |