Skip to content

Commit 54bd40c

Browse files
authored
Merge pull request #739 from devtron-labs/feat/app-group-manage-traffic
feat: Checkbox - add error prop, add new icons
2 parents 8c9d25e + 19c1485 commit 54bd40c

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed
Lines changed: 4 additions & 0 deletions
Loading

src/Assets/IconV2/ic-filter.svg

Lines changed: 3 additions & 0 deletions
Loading

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'> {

src/Shared/Components/Icon/Icon.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ import { ReactComponent as ICError } from '@IconsV2/ic-error.svg'
5050
import { ReactComponent as ICFailure } from '@IconsV2/ic-failure.svg'
5151
import { ReactComponent as ICFastForward } from '@IconsV2/ic-fast-forward.svg'
5252
import { ReactComponent as ICFileKey } from '@IconsV2/ic-file-key.svg'
53+
import { ReactComponent as ICFilter } from '@IconsV2/ic-filter.svg'
54+
import { ReactComponent as ICFilterApplied } from '@IconsV2/ic-filter-applied.svg'
5355
import { ReactComponent as ICFlask } from '@IconsV2/ic-flask.svg'
5456
import { ReactComponent as ICFolderUser } from '@IconsV2/ic-folder-user.svg'
5557
import { ReactComponent as ICGear } from '@IconsV2/ic-gear.svg'
@@ -187,6 +189,8 @@ export const iconMap = {
187189
'ic-failure': ICFailure,
188190
'ic-fast-forward': ICFastForward,
189191
'ic-file-key': ICFileKey,
192+
'ic-filter-applied': ICFilterApplied,
193+
'ic-filter': ICFilter,
190194
'ic-flask': ICFlask,
191195
'ic-folder-user': ICFolderUser,
192196
'ic-gear': ICGear,

0 commit comments

Comments
 (0)