Skip to content

Commit 02b9807

Browse files
committed
feat: Checkbox - add error prop to Checkbox
1 parent 760fc2f commit 02b9807

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Common/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class Checkbox extends Component<CheckboxProps> {
3535
<input
3636
{...(this.props.name ? { name: this.props.name } : {})}
3737
type="checkbox"
38-
className="form__checkbox"
38+
className={`form__checkbox ${this.props.error ? 'error': ''}`}
3939
disabled={this.props.disabled}
4040
value={this.props.value}
4141
onChange={this.props.onChange}

src/Common/Types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export interface CheckboxProps {
117117
onClick?: (event) => void
118118
id?: string
119119
dataTestId?: string
120+
error?: boolean
120121
}
121122

122123
export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {

0 commit comments

Comments
 (0)