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

Tag/Badge: SeverityType incorrect #3056

Closed
Fatalito opened this issue Jul 13, 2022 · 3 comments · Fixed by #3057 or #3067
Closed

Tag/Badge: SeverityType incorrect #3056

Fatalito opened this issue Jul 13, 2022 · 3 comments · Fixed by #3057 or #3067
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@Fatalito
Copy link
Contributor

Fatalito commented Jul 13, 2022

Describe the bug

The type TagSeverityType allows 'success' | 'info' | 'warn' | 'error'
it's incorrect, documentation is correct: https://www.primefaces.org/primereact/tag/
It is success, info, warning, danger .

Currently typescript complain, as a workaround I do
<Tag severity={'warning' as TagSeverityType} />

Reproducer

No response

PrimeReact version

8.2.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. create a tag component with severity danger
  2. typescript complains

Expected behavior

  1. create a tag component with severity danger
  2. you see a red tag!
@Fatalito Fatalito added Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component. labels Jul 13, 2022
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 13, 2022
@melloware melloware added this to the 9.0.0 milestone Jul 13, 2022
@melloware melloware linked a pull request Jul 13, 2022 that will close this issue
@melloware
Copy link
Member

Good catch you are correct.

@Fatalito
Copy link
Contributor Author

great!

@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Type: Bug Issue contains a defect related to a specific component. labels Jul 13, 2022
@melloware melloware changed the title Tag: TagSeverityType Tag/Badge: SeverityType incorrect Jul 15, 2022
melloware added a commit to melloware/primereact that referenced this issue Jul 15, 2022
@melloware
Copy link
Member

Badge had the same issue so I updated that one as well!

@melloware melloware self-assigned this Jul 15, 2022
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Jul 18, 2022
@mertsincan mertsincan modified the milestones: 9.0.0, 8.3.0 Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
3 participants