mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
refactor(console): make the disabled
prop of the CheckBox
optional (#2933)
This commit is contained in:
parent
8624fc8e62
commit
3951724bcd
5 changed files with 2 additions and 6 deletions
|
@ -10,7 +10,7 @@ import * as styles from './index.module.scss';
|
|||
type Props = {
|
||||
/* eslint-disable react/boolean-prop-naming */
|
||||
checked: boolean;
|
||||
disabled: boolean;
|
||||
disabled?: boolean;
|
||||
indeterminate?: boolean;
|
||||
/* eslint-enable react/boolean-prop-naming */
|
||||
onChange: (value: boolean) => void;
|
||||
|
@ -21,7 +21,7 @@ type Props = {
|
|||
|
||||
const Checkbox = ({
|
||||
checked,
|
||||
disabled,
|
||||
disabled = false,
|
||||
indeterminate,
|
||||
onChange,
|
||||
label,
|
||||
|
|
|
@ -32,7 +32,6 @@ const ResourceItem = ({ resource, selectedScopes, onSelectResource, onSelectScop
|
|||
<Checkbox
|
||||
checked={selectedScopesCount === totalScopesCount}
|
||||
indeterminate={selectedScopesCount > 0 && selectedScopesCount < totalScopesCount}
|
||||
disabled={false}
|
||||
onChange={() => {
|
||||
onSelectResource(resource);
|
||||
}}
|
||||
|
|
|
@ -15,7 +15,6 @@ const SourceScopeItem = ({ scope, scope: { name }, isSelected, onSelect }: Props
|
|||
<div className={styles.sourceScopeItem}>
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
disabled={false}
|
||||
onChange={() => {
|
||||
onSelect(scope);
|
||||
}}
|
||||
|
|
|
@ -30,7 +30,6 @@ const SourceUserItem = ({ user: { avatar, name }, isSelected, onSelect }: Props)
|
|||
>
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
disabled={false}
|
||||
onChange={() => {
|
||||
onSelect();
|
||||
}}
|
||||
|
|
|
@ -30,7 +30,6 @@ const SourceRoleItem = ({ role, isSelected, onSelect }: Props) => {
|
|||
>
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
disabled={false}
|
||||
onChange={() => {
|
||||
onSelect();
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue