Skip to content

[FormattedText] Avoid using children #1086

Open
@gabro

Description

@gabro

Project card

requirements

FormattedText uses children for the content, making it difficult and ambiguous to type.

Proposal: use a content or value prop so:

const content = 'foo \n bar';

// Before
<FormattedText>{content}</FormattedText>

// After
<FormattedText content={content} />

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingIssues that introduce a breaking change that must be release with a new "major"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions