File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ interface CheckboxProps {
1212 onChange ?: ChangeEventHandler < HTMLInputElement >
1313 size ?: number
1414 color ?: string
15+ id ?: string
1516}
1617
1718const Checkbox : FC < CheckboxProps > = ( {
@@ -20,6 +21,7 @@ const Checkbox: FC<CheckboxProps> = ({
2021 onChange,
2122 size,
2223 color,
24+ id,
2325} ) => {
2426 const Icon = indeterminate
2527 ? CheckBoxIndeterminateIcon
@@ -39,6 +41,7 @@ const Checkbox: FC<CheckboxProps> = ({
3941 ` }
4042 >
4143 < input
44+ id = { id }
4245 type = "checkbox"
4346 checked = { checked }
4447 onChange = { chandleChange }
Original file line number Diff line number Diff line change @@ -91,8 +91,16 @@ const Option: FC = () => {
9191 justify-content : flex-end;
9292 ` }
9393 >
94- < span > { hasEnable ? '全部禁用' : '全部启用' } </ span >
94+ < label
95+ htmlFor = "selectAll"
96+ css = { css `
97+ cursor : pointer;
98+ ` }
99+ >
100+ { hasEnable ? '全部禁用' : '全部启用' }
101+ </ label >
95102 < Checkbox
103+ id = "selectAll"
96104 checked = { hasEnable }
97105 indeterminate = { indeterminate }
98106 onChange = { ( ) =>
You can’t perform that action at this time.
0 commit comments