Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make highlight prop optional on highlight component #280

Open
guiherzog opened this issue Apr 24, 2020 · 0 comments
Open

Make highlight prop optional on highlight component #280

guiherzog opened this issue Apr 24, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@guiherzog
Copy link
Contributor

New Feature Proposal

Description

When using the highlight component, it would be convenient to be able to not give any highlight to it and it would still render a span with text on it without highlighting anything.

Background

I would like to render a text without knowing if I have anything to highlight or not.
Currently, I have to do something like that:

{highlight ? <Highlight text={text} highlight={highlight} /> : <Label>{text}</Label>}

// I would prefer, it just ignores the highlight if it's undefined
<Highlight text={text} highlight={highlight}> 

It throws an error at the moment.

@guiherzog guiherzog added enhancement New feature or request good first issue Good for newcomers labels May 11, 2020
FlorianRappl added a commit to FlorianRappl/precise-ui that referenced this issue Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants