Skip to content

Commit caa1046

Browse files
author
Tanner Reits
committed
fix(segment-content): usage & common API sections
1 parent 517a6ad commit caa1046

File tree

3 files changed

+57
-5
lines changed

3 files changed

+57
-5
lines changed

docs/api/segment-content.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
title: "ion-segment-content"
33
---
44

5+
import Props from '@ionic-internal/component-api/v8/segment-content/props.md';
6+
import Events from '@ionic-internal/component-api/v8/segment-content/events.md';
7+
import Methods from '@ionic-internal/component-api/v8/segment-content/methods.md';
8+
import Parts from '@ionic-internal/component-api/v8/segment-content/parts.md';
9+
import CustomProps from '@ionic-internal/component-api/v8/segment-content/custom-props.mdx';
10+
import Slots from '@ionic-internal/component-api/v8/segment-content/slots.md';
11+
512
<head>
613
<title>ion-segment-content: Display control element for swipeable segments</title>
714
<meta name="description" content="ion-segment-contents are wrapper elements used to control the display of child elements when using swipeable segments." />
@@ -13,4 +20,33 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
1320

1421
Segment content is a wrapper element used to control the display of child elements when using swipeable segments. Segment content elements are children of a single
1522
[segment view](./segment-view.md) instance that is linked to a [segment](./segment.md). See our [swipeable segments](./segment.md#swipeable-segments) documentation
16-
for more information on how to use `ion-segment-content`s.
23+
for more information on how to use segment contents.
24+
25+
## Usage
26+
27+
Each `ion-segment-content` needs a unique `id` attribute. This will be used to link the segment content to a segment button via the button's
28+
[contentId property](./segment-button.md#properties).
29+
30+
<!-- Reuse swipeable segments playground -->
31+
32+
import Swipeable from '@site/static/usage/v8/segment/swipeable/index.md';
33+
34+
<Swipeable />
35+
36+
## Properties
37+
<Props />
38+
39+
## Events
40+
<Events />
41+
42+
## Methods
43+
<Methods />
44+
45+
## CSS Shadow Parts
46+
<Parts />
47+
48+
## CSS Custom Properties
49+
<CustomProps />
50+
51+
## Slots
52+
<Slots />

docs/api/segment-view.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ title: "ion-segment-view"
44

55
import Props from '@ionic-internal/component-api/v8/segment-view/props.md';
66
import Events from '@ionic-internal/component-api/v8/segment-view/events.md';
7+
import Methods from '@ionic-internal/component-api/v8/segment-view/methods.md';
8+
import Parts from '@ionic-internal/component-api/v8/segment-view/parts.md';
9+
import CustomProps from '@ionic-internal/component-api/v8/segment-view/custom-props.mdx';
10+
import Slots from '@ionic-internal/component-api/v8/segment-view/slots.md';
711

812
<head>
913
<title>ion-segment-view: Controller element for swipeable segments</title>
@@ -15,12 +19,22 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
1519
<EncapsulationPill type="shadow" />
1620

1721
Segment view is a wrapper element that links a group of [segment contents](./segment-content.md) to a [segment](./segment.md) when using swipeable segments.
18-
See our [swipeable segments](./segment.md#swipeable-segments) documentation for more information on how to use `ion-segment-view`s.
22+
See our [swipeable segments](./segment.md#swipeable-segments) documentation for more information on how to use segment views.
1923

2024
## Properties
21-
2225
<Props />
2326

2427
## Events
28+
<Events />
29+
30+
## Methods
31+
<Methods />
32+
33+
## CSS Shadow Parts
34+
<Parts />
35+
36+
## CSS Custom Properties
37+
<CustomProps />
2538

26-
<Events />
39+
## Slots
40+
<Slots />

docs/api/segment.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ Each [segment button](./segment-button.md) can be associated with a [segment con
5555
when the segment is active. With this approach, each segment's content can be swiped or scrolled between and the segment will be updated
5656
to reflect the currently visible content.
5757

58-
If no initial `value` is assigned to the `ion-segment` when using swipeable segment, the segment will default to the value of the first segment button.
58+
:::warning
59+
If no initial `value` is assigned to the `ion-segment` when using swipeable segments, the segment will default to the value of the first segment button.
5960

6061
Segment buttons cannot be disabled when used with swipeable segments.
62+
:::
6163

6264
import Swipeable from '@site/static/usage/v8/segment/swipeable/index.md';
6365

0 commit comments

Comments
 (0)