-
+
+ {({ isSelected, isIndeterminate }) => {
+ if (isIndeterminate) {
+ return ;
+ }
-
- {indeterminate ? (
-
- ) : isChecked ? (
-
- ) : null}
-
+ if (isSelected) {
+ return ;
+ }
+
+ return null;
+ }}
+
+
+
+ {(label || description) && (
+
+ {label && (
+
+ {label}
+
+ )}
+
+ {description && (
+
+ {description}
+
+ )}
-
- {/* Label and Sub-description */}
- {(label || description) && (
-
- {label && (
-
- {label}
-
- )}
- {description && (
-
- {description}
-
- )}
-
- )}
-
-
- {errorMessage && (
-
{errorMessage}
)}
-
- );
- }
-);
+
-Checkbox.displayName = 'Checkbox';
+ {errorMessage && (
+