Set input group in orange when modified but not applied
This commit is contained in:
parent
a9831b6b7f
commit
e3f57773d7
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
|||
import * as React from 'react';
|
||||
import { Properties } from '../ContainerProperties/ContainerProperties';
|
||||
|
||||
interface ITextInputGroupProps {
|
||||
labelKey?: string
|
||||
|
@ -36,6 +35,8 @@ export function TextInputGroup(props: ITextInputGroupProps): JSX.Element {
|
|||
}
|
||||
}
|
||||
|
||||
const warningClass = props.value !== value ? 'focus:border-orange-200 border-orange-200 focus:ring-orange-200 ring-orange-200' : '';
|
||||
|
||||
return <>
|
||||
<label
|
||||
key={props.labelKey}
|
||||
|
@ -47,7 +48,7 @@ export function TextInputGroup(props: ITextInputGroupProps): JSX.Element {
|
|||
<input
|
||||
key={props.inputKey}
|
||||
id={props.inputKey}
|
||||
className={`${className} ${props.inputClassName}`}
|
||||
className={`${className} ${props.inputClassName} ${warningClass}`}
|
||||
type={props.type}
|
||||
value={value}
|
||||
onChange={(event) => setValue(event.target.value)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue