From a5e4669c4bcbcb2cdd605ed17c35e42438bd5596 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 30 Jun 2020 11:31:54 -0400 Subject: [PATCH] feat(segment-button, toast): add additional parts docs (#21532) --- core/api.txt | 5 +++++ core/src/components/segment-button/readme.md | 9 +++++---- core/src/components/segment-button/segment-button.tsx | 1 + core/src/components/toast/readme.md | 10 ++++++++++ core/src/components/toast/toast.tsx | 5 +++++ 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/core/api.txt b/core/api.txt index f6c88ae20d..1a4d9913ae 100644 --- a/core/api.txt +++ b/core/api.txt @@ -1051,6 +1051,7 @@ ion-segment-button,css-prop,--padding-start ion-segment-button,css-prop,--padding-top ion-segment-button,css-prop,--transition ion-segment-button,part,indicator +ion-segment-button,part,indicator-background ion-segment-button,part,native ion-select,shadow @@ -1290,6 +1291,10 @@ ion-toast,css-prop,--min-width ion-toast,css-prop,--start ion-toast,css-prop,--white-space ion-toast,css-prop,--width +ion-toast,part,button +ion-toast,part,container +ion-toast,part,header +ion-toast,part,message ion-toggle,shadow ion-toggle,prop,checked,boolean,false,false,false diff --git a/core/src/components/segment-button/readme.md b/core/src/components/segment-button/readme.md index 3cf0ed7946..49164e69a6 100644 --- a/core/src/components/segment-button/readme.md +++ b/core/src/components/segment-button/readme.md @@ -796,10 +796,11 @@ export class SegmentButtonExample { ## Shadow Parts -| Part | Description | -| ------------- | ------------------------------------------------------------- | -| `"indicator"` | The indicator displayed on the checked segment button. | -| `"native"` | The native HTML button element that wraps all child elements. | +| Part | Description | +| ------------------------ | --------------------------------------------------------------------------------- | +| `"indicator"` | The indicator displayed on the checked segment button. | +| `"indicator-background"` | The background element for the indicator displayed on the checked segment button. | +| `"native"` | The native HTML button element that wraps all child elements. | ## CSS Custom Properties diff --git a/core/src/components/segment-button/segment-button.tsx b/core/src/components/segment-button/segment-button.tsx index 29e461f0eb..961aa7f77f 100644 --- a/core/src/components/segment-button/segment-button.tsx +++ b/core/src/components/segment-button/segment-button.tsx @@ -12,6 +12,7 @@ let ids = 0; * * @part native - The native HTML button element that wraps all child elements. * @part indicator - The indicator displayed on the checked segment button. + * @part indicator-background - The background element for the indicator displayed on the checked segment button. */ @Component({ tag: 'ion-segment-button', diff --git a/core/src/components/toast/readme.md b/core/src/components/toast/readme.md index b32869dd30..1f2c22e3af 100644 --- a/core/src/components/toast/readme.md +++ b/core/src/components/toast/readme.md @@ -288,6 +288,16 @@ Type: `Promise` +## Shadow Parts + +| Part | Description | +| ------------- | --------------------------------------------------------- | +| `"button"` | Any button element that is displayed inside of the toast. | +| `"container"` | The element that wraps all child elements. | +| `"header"` | The header text of the toast. | +| `"message"` | The body text of the toast. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/toast/toast.tsx b/core/src/components/toast/toast.tsx index 0fa8b86f5b..423d70a8af 100644 --- a/core/src/components/toast/toast.tsx +++ b/core/src/components/toast/toast.tsx @@ -13,6 +13,11 @@ import { mdLeaveAnimation } from './animations/md.leave'; /** * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use. + * + * @part button - Any button element that is displayed inside of the toast. + * @part container - The element that wraps all child elements. + * @part header - The header text of the toast. + * @part message - The body text of the toast. */ @Component({ tag: 'ion-toast',