Skip to content

Commit d676a91

Browse files
committed
feat(chip): update key names
1 parent faf287a commit d676a91

5 files changed

Lines changed: 29 additions & 29 deletions

File tree

core/src/components/chip/chip.interfaces.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ type IonChipShapeDefinition = {
8585
};
8686

8787
type IonChipMediaDefinition = {
88-
// Targets `:first-child`
89-
first?: {
88+
/** Targets `:first-child` */
89+
leading?: {
9090
margin?: IonMargin;
9191
};
9292

93-
// Targets `:last-child`
94-
last?: {
93+
/** Targets `:last-child` */
94+
trailing?: {
9595
margin?: IonMargin;
9696
};
9797
};

core/src/components/chip/chip.scss

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -482,19 +482,19 @@
482482

483483
::slotted(ion-icon:first-child) {
484484
@include mixins.margin(
485-
var(--ion-chip-icon-first-margin-top),
486-
var(--ion-chip-icon-first-margin-end),
487-
var(--ion-chip-icon-first-margin-bottom),
488-
var(--ion-chip-icon-first-margin-start)
485+
var(--ion-chip-icon-leading-margin-top),
486+
var(--ion-chip-icon-leading-margin-end),
487+
var(--ion-chip-icon-leading-margin-bottom),
488+
var(--ion-chip-icon-leading-margin-start)
489489
);
490490
}
491491

492492
::slotted(ion-icon:last-child) {
493493
@include mixins.margin(
494-
var(--ion-chip-icon-last-margin-top),
495-
var(--ion-chip-icon-last-margin-end),
496-
var(--ion-chip-icon-last-margin-bottom),
497-
var(--ion-chip-icon-last-margin-start)
494+
var(--ion-chip-icon-trailing-margin-top),
495+
var(--ion-chip-icon-trailing-margin-end),
496+
var(--ion-chip-icon-trailing-margin-bottom),
497+
var(--ion-chip-icon-trailing-margin-start)
498498
);
499499
}
500500

@@ -508,18 +508,18 @@
508508

509509
::slotted(ion-avatar:first-child) {
510510
@include mixins.margin(
511-
var(--ion-chip-avatar-first-margin-top),
512-
var(--ion-chip-avatar-first-margin-end),
513-
var(--ion-chip-avatar-first-margin-bottom),
514-
var(--ion-chip-avatar-first-margin-start)
511+
var(--ion-chip-avatar-leading-margin-top),
512+
var(--ion-chip-avatar-leading-margin-end),
513+
var(--ion-chip-avatar-leading-margin-bottom),
514+
var(--ion-chip-avatar-leading-margin-start)
515515
);
516516
}
517517

518518
::slotted(ion-avatar:last-child) {
519519
@include mixins.margin(
520-
var(--ion-chip-avatar-last-margin-top),
521-
var(--ion-chip-avatar-last-margin-end),
522-
var(--ion-chip-avatar-last-margin-bottom),
523-
var(--ion-chip-avatar-last-margin-start)
520+
var(--ion-chip-avatar-trailing-margin-top),
521+
var(--ion-chip-avatar-trailing-margin-end),
522+
var(--ion-chip-avatar-trailing-margin-bottom),
523+
var(--ion-chip-avatar-trailing-margin-start)
524524
);
525525
}

core/src/components/item-divider/item-divider.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
* @prop --ion-item-divider-paragraph-color: Color of the slotted p
9595
* @prop --ion-item-divider-paragraph-font-size: Font size of the slotted p
9696
* @prop --ion-item-divider-paragraph-text-overflow: Text overflow of the slotted p
97-
* @prop --ion-item-divider-paragraph-overflow: Overflow of the slotted p
97+
* @prop --ion-item-divider-paragraph-overflow: Overflow of the slotted p
9898
* @prop --ion-item-divider-paragraph-trailing-margin-top: Top margin of the slotted p when it is the last child
9999
* @prop --ion-item-divider-paragraph-trailing-margin-end: Right margin if direction is left-to-right, and left margin if direction is right-to-left of the slotted p when it is the last child
100100
* @prop --ion-item-divider-paragraph-trailing-margin-bottom: Bottom margin of the slotted p when it is the last child

core/src/themes/ios/default.tokens.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ export const defaultTheme: DefaultTheme = {
359359
size: `${(20 / components.chip.font.size).toFixed(2)}em`,
360360
},
361361

362-
first: {
362+
leading: {
363363
margin: {
364364
top: '-4px',
365365
end: 'var(--ion-spacing-sm)',
@@ -368,7 +368,7 @@ export const defaultTheme: DefaultTheme = {
368368
},
369369
},
370370

371-
last: {
371+
trailing: {
372372
margin: {
373373
top: '-4px',
374374
end: '-4px',
@@ -382,7 +382,7 @@ export const defaultTheme: DefaultTheme = {
382382
height: `${(24 / components.chip.font.size).toFixed(2)}em`,
383383
width: `${(24 / components.chip.font.size).toFixed(2)}em`,
384384

385-
first: {
385+
leading: {
386386
margin: {
387387
top: '-4px',
388388
end: 'var(--ion-spacing-sm)',
@@ -391,7 +391,7 @@ export const defaultTheme: DefaultTheme = {
391391
},
392392
},
393393

394-
last: {
394+
trailing: {
395395
margin: {
396396
top: '-4px',
397397
end: '-8px',

core/src/themes/md/default.tokens.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ export const defaultTheme: DefaultTheme = {
356356
size: `${(20 / components.chip.font.size).toFixed(2)}em`,
357357
},
358358

359-
first: {
359+
leading: {
360360
margin: {
361361
top: '-4px',
362362
end: 'var(--ion-spacing-sm)',
@@ -365,7 +365,7 @@ export const defaultTheme: DefaultTheme = {
365365
},
366366
},
367367

368-
last: {
368+
trailing: {
369369
margin: {
370370
top: '-4px',
371371
end: '-4px',
@@ -379,7 +379,7 @@ export const defaultTheme: DefaultTheme = {
379379
height: `${(24 / components.chip.font.size).toFixed(2)}em`,
380380
width: `${(24 / components.chip.font.size).toFixed(2)}em`,
381381

382-
first: {
382+
leading: {
383383
margin: {
384384
top: '-4px',
385385
end: 'var(--ion-spacing-sm)',
@@ -388,7 +388,7 @@ export const defaultTheme: DefaultTheme = {
388388
},
389389
},
390390

391-
last: {
391+
trailing: {
392392
margin: {
393393
top: '-4px',
394394
end: '-8px',

0 commit comments

Comments
 (0)