Skip to content

[Feature Request] Support word-break like props for <Text /> component #741

@MrWangJustToDo

Description

@MrWangJustToDo

Currently, the <Text /> component supports the wrap prop, which controls the overflow behavior.

	if (wrapType === 'wrap') {
		wrappedText = wrapAnsi(text, maxWidth, {
			trim: false,
			hard: true,
		});
	}

Can we add a prop like word-break to control the wrapping behavior, provided by the wrap-ansi package?
wrap-ansi: wordwrap

	if (wrapType === 'wrap') {
		wrappedText = wrapAnsi(text, maxWidth, {
			trim: false,
			hard: true,
                        wordwrap: style['word-break'] ?? true
		});
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions