Function text

  • Creates a text component for displaying static or dynamic text content.

    Parameters

    • props: UiTextProps

      Configuration object

    Returns Element

    A JSX element representing the text component

    Basic usage with static text

    text({
    text: 'Hello, World!'
    });

    Usage with dynamic text from central state

    text({
    text: (state) => `Welcome back, ${state.userName}!`
    });

    Usage with info callout text

    text({
    text: ':::info\nThis is an informational message\n:::'
    });

    Usage with warning callout text

    text({
    text: ':::warn\nThis is a warning message\n:::'
    });