Skip to content

Commit 54da960

Browse files
committed
feat(checkbox): add shadow parts
1 parent 444e213 commit 54da960

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

core/api.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,11 @@ ion-checkbox,css-prop,--size,md
432432
ion-checkbox,css-prop,--transition,ios
433433
ion-checkbox,css-prop,--transition,md
434434
ion-checkbox,part,container
435+
ion-checkbox,part,error-text
436+
ion-checkbox,part,helper-text
435437
ion-checkbox,part,label
436438
ion-checkbox,part,mark
439+
ion-checkbox,part,supporting-text
437440

438441
ion-chip,shadow
439442
ion-chip,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true

core/src/components/checkbox/checkbox.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ import type { CheckboxChangeEventDetail } from './checkbox-interface';
1717
* @part container - The container for the checkbox mark.
1818
* @part label - The label text describing the checkbox.
1919
* @part mark - The checkmark used to indicate the checked state.
20+
* @part supporting-text - Supporting text displayed beneath the checkbox label.
21+
* @part helper-text - Supporting text displayed beneath the checkbox label when the checkbox is valid.
22+
* @part error-text - Supporting text displayed beneath the checkbox label when the checkbox is invalid and touched.
2023
*/
2124
@Component({
2225
tag: 'ion-checkbox',
@@ -211,10 +214,10 @@ export class Checkbox implements ComponentInterface {
211214

212215
return (
213216
<div class="checkbox-bottom">
214-
<div id={helperTextId} class="helper-text">
217+
<div id={helperTextId} class="helper-text" part="supporting-text helper-text">
215218
{helperText}
216219
</div>
217-
<div id={errorTextId} class="error-text">
220+
<div id={errorTextId} class="error-text" part="supporting-text error-text">
218221
{errorText}
219222
</div>
220223
</div>

0 commit comments

Comments
 (0)