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

Improve p-invalid class for InputSwitch #2909

Closed
franmc01 opened this issue May 19, 2022 · 1 comment
Closed

Improve p-invalid class for InputSwitch #2909

franmc01 opened this issue May 19, 2022 · 1 comment
Assignees
Labels
Component: Theme Issue or pull request is related to Theme Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@franmc01
Copy link
Contributor

Describe the bug

I am in the development of a product for a client and within the requirements is that the user be told that when an input visibly indicates that there is an error.

I would expect it to look like this
image

But i get
image

Even if I add the manual class, no style is applied to the input, is that behavior normal?
image

To get the desired effect I had to do it in a custom way, wouldn't that be native?

Reproducer

No response

PrimeReact version

8

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@franmc01 franmc01 added the Type: Bug Issue contains a defect related to a specific component. label May 19, 2022
@franmc01 franmc01 changed the title Component: Title Component: Input Switch May 19, 2022
@melloware melloware changed the title Component: Input Switch InputSwitch: Error styling May 19, 2022
@melloware
Copy link
Member

Right now its an easy workaround just add this CSS to your CSS file that loads after the theme. But this needs to be fixed in PF core themes.

.p-inputswitch.p-invalid .p-inputswitch-slider {
  background-color: #e24c4c;
}

@melloware melloware added Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team Component: Theme Issue or pull request is related to Theme and removed Type: Bug Issue contains a defect related to a specific component. labels May 20, 2022
@melloware melloware added this to the 8.2.0 milestone May 20, 2022
@mertsincan mertsincan changed the title InputSwitch: Error styling Improve p-invalid class for InputSwitch Jul 6, 2022
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team labels Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Theme Issue or pull request is related to Theme Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants