InlineTextFunction
Renders a text-function micronode such as !format:comma{…}, !truncate:8{…} or !pad:6{…}, applied to its body's current text.
@internote/canvas-sdk/reactimport { InlineTextFunction } from '@internote/canvas-sdk/react';A bound expression in the body is evaluated against the live-value store first, and the component re-renders when it moves, so a label and the sentence beside it format the same number the same way.
#Props
Takes no className, style or id.
attributesThe micronode's attributes, such as
as: and places: for format, by name.Record<string, unknown>itemsThe micronode's body, a string or inline content; live values in it are read from the store.
unknownnameThe text function to apply.
formatupperlowertitletruncatepad#Example
<InlineTextFunction name="format" items={item.body} attributes={{ as: 'percent', places: 1 }} />Declared in packages/canvas-sdk/src/content/text-function-values.tsx:137.