mirror of
https://github.com/desktop/desktop
synced 2024-10-05 15:49:27 +00:00
Don't display invalid state in GHE login form
This commit is contained in:
parent
ea449936b1
commit
0e5231db5d
|
@ -105,6 +105,7 @@ export class AuthenticationForm extends React.Component<
|
|||
label="Username or email address"
|
||||
disabled={disabled}
|
||||
required={true}
|
||||
displayInvalidState={false}
|
||||
// eslint-disable-next-line jsx-a11y/no-autofocus
|
||||
autoFocus={true}
|
||||
onValueChanged={this.onUsernameChange}
|
||||
|
@ -115,6 +116,7 @@ export class AuthenticationForm extends React.Component<
|
|||
type="password"
|
||||
disabled={disabled}
|
||||
required={true}
|
||||
displayInvalidState={false}
|
||||
onValueChanged={this.onPasswordChange}
|
||||
/>
|
||||
|
||||
|
|
|
@ -28,6 +28,12 @@ export interface ITextBoxProps {
|
|||
/** Indicates if input field should be required */
|
||||
readonly required?: boolean
|
||||
|
||||
/**
|
||||
* Indicates whether or not the control displays an invalid state.
|
||||
* Default: true
|
||||
*/
|
||||
readonly displayInvalidState?: boolean
|
||||
|
||||
/**
|
||||
* Called when the user changes the value in the input field.
|
||||
*
|
||||
|
@ -244,7 +250,11 @@ export class TextBox extends React.Component<ITextBoxProps, ITextBoxState> {
|
|||
const inputId = label ? this.state.inputId : undefined
|
||||
|
||||
return (
|
||||
<div className={classNames('text-box-component', className)}>
|
||||
<div
|
||||
className={classNames('text-box-component', className, {
|
||||
'no-invalid-state': this.props.displayInvalidState === false,
|
||||
})}
|
||||
>
|
||||
{label && <label htmlFor={inputId}>{label}</label>}
|
||||
|
||||
<input
|
||||
|
|
Loading…
Reference in a new issue