-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(): merge feature-8.4 docs (#3877)
* docs(select): add `modal` interface to `ion-select` docs (#3872) * docs(select): update select docs for modal interface * fix(select): point playground to correct demo * feat(segment): add playground & docs for segment view (#3875) * feat(segment): add playground & docs for segment view * fix(segment-view): api import version * fix(segment-content): usage & common API sections * Force CI run
- Loading branch information
1 parent
d1f0b7c
commit 9a40ae3
Showing
25 changed files
with
573 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: "ion-segment-content" | ||
--- | ||
|
||
import Props from '@ionic-internal/component-api/v8/segment-content/props.md'; | ||
import Events from '@ionic-internal/component-api/v8/segment-content/events.md'; | ||
import Methods from '@ionic-internal/component-api/v8/segment-content/methods.md'; | ||
import Parts from '@ionic-internal/component-api/v8/segment-content/parts.md'; | ||
import CustomProps from '@ionic-internal/component-api/v8/segment-content/custom-props.mdx'; | ||
import Slots from '@ionic-internal/component-api/v8/segment-content/slots.md'; | ||
|
||
<head> | ||
<title>ion-segment-content: Display control element for swipeable segments</title> | ||
<meta name="description" content="ion-segment-contents are wrapper elements used to control the display of child elements when using swipeable segments." /> | ||
</head> | ||
|
||
import EncapsulationPill from '@components/page/api/EncapsulationPill'; | ||
|
||
<EncapsulationPill type="shadow" /> | ||
|
||
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 | ||
[segment view](./segment-view.md) instance that is linked to a [segment](./segment.md). See our [swipeable segments](./segment.md#swipeable-segments) documentation | ||
for more information on how to use segment contents. | ||
|
||
## Usage | ||
|
||
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 | ||
[contentId property](./segment-button.md#properties). | ||
|
||
<!-- Reuse swipeable segments playground --> | ||
|
||
import Swipeable from '@site/static/usage/v8/segment/swipeable/index.md'; | ||
|
||
<Swipeable /> | ||
|
||
## Properties | ||
<Props /> | ||
|
||
## Events | ||
<Events /> | ||
|
||
## Methods | ||
<Methods /> | ||
|
||
## CSS Shadow Parts | ||
<Parts /> | ||
|
||
## CSS Custom Properties | ||
<CustomProps /> | ||
|
||
## Slots | ||
<Slots /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: "ion-segment-view" | ||
--- | ||
|
||
import Props from '@ionic-internal/component-api/v8/segment-view/props.md'; | ||
import Events from '@ionic-internal/component-api/v8/segment-view/events.md'; | ||
import Methods from '@ionic-internal/component-api/v8/segment-view/methods.md'; | ||
import Parts from '@ionic-internal/component-api/v8/segment-view/parts.md'; | ||
import CustomProps from '@ionic-internal/component-api/v8/segment-view/custom-props.mdx'; | ||
import Slots from '@ionic-internal/component-api/v8/segment-view/slots.md'; | ||
|
||
<head> | ||
<title>ion-segment-view: Controller element for swipeable segments</title> | ||
<meta name="description" content="ion-segment-views are wrapper elements that link a group of segment contents to a segment" /> | ||
</head> | ||
|
||
import EncapsulationPill from '@components/page/api/EncapsulationPill'; | ||
|
||
<EncapsulationPill type="shadow" /> | ||
|
||
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. | ||
See our [swipeable segments](./segment.md#swipeable-segments) documentation for more information on how to use segment views. | ||
|
||
## Properties | ||
<Props /> | ||
|
||
## Events | ||
<Events /> | ||
|
||
## Methods | ||
<Methods /> | ||
|
||
## CSS Shadow Parts | ||
<Parts /> | ||
|
||
## CSS Custom Properties | ||
<CustomProps /> | ||
|
||
## Slots | ||
<Slots /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
```css | ||
ion-segment-view { | ||
height: 150px; | ||
} | ||
|
||
ion-segment-content { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
ion-segment-content:nth-of-type(1) { | ||
background: lightpink; | ||
} | ||
ion-segment-content:nth-of-type(2) { | ||
background: lightblue; | ||
} | ||
ion-segment-content:nth-of-type(3) { | ||
background: lightgreen; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
```html | ||
<ion-segment> | ||
<ion-segment-button value="first" content-id="first"> | ||
<ion-label>First</ion-label> | ||
</ion-segment-button> | ||
<ion-segment-button value="second" content-id="second"> | ||
<ion-label>Second</ion-label> | ||
</ion-segment-button> | ||
<ion-segment-button value="third" content-id="third"> | ||
<ion-label>Third</ion-label> | ||
</ion-segment-button> | ||
</ion-segment> | ||
<ion-segment-view> | ||
<ion-segment-content id="first">First</ion-segment-content> | ||
<ion-segment-content id="second">Second</ion-segment-content> | ||
<ion-segment-content id="third">Third</ion-segment-content> | ||
</ion-segment-view> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Segment - Swipeable</title> | ||
<link rel="stylesheet" href="../../common.css" /> | ||
<script src="../../common.js"></script> | ||
<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core@8/dist/ionic/ionic.esm.js"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core@8/css/ionic.bundle.css" /> | ||
|
||
<style> | ||
ion-segment-view { | ||
height: 168px; | ||
} | ||
|
||
ion-segment-content { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
ion-segment-content:nth-of-type(1) { | ||
background: lightpink; | ||
} | ||
ion-segment-content:nth-of-type(2) { | ||
background: lightblue; | ||
} | ||
ion-segment-content:nth-of-type(3) { | ||
background: lightgreen; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<ion-app> | ||
<ion-content> | ||
<ion-segment> | ||
<ion-segment-button value="first" content-id="first"> | ||
<ion-label>First</ion-label> | ||
</ion-segment-button> | ||
<ion-segment-button value="second" content-id="second"> | ||
<ion-label>Second</ion-label> | ||
</ion-segment-button> | ||
<ion-segment-button value="third" content-id="third"> | ||
<ion-label>Third</ion-label> | ||
</ion-segment-button> | ||
</ion-segment> | ||
<ion-segment-view> | ||
<ion-segment-content id="first">First</ion-segment-content> | ||
<ion-segment-content id="second">Second</ion-segment-content> | ||
<ion-segment-content id="third">Third</ion-segment-content> | ||
</ion-segment-view> | ||
</ion-content> | ||
</ion-app> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Playground from '@site/src/components/global/Playground'; | ||
|
||
import javascript from './javascript.md'; | ||
import react_main_tsx from './react/react_tsx.md'; | ||
import react_main_css from './react/react_css.md'; | ||
import vue from './vue.md'; | ||
import angular_html from './angular/angular_html.md'; | ||
import angular_css from './angular/angular_css.md'; | ||
|
||
<Playground | ||
version="8" | ||
code={{ | ||
javascript, | ||
react: { | ||
files: { | ||
'src/main.tsx': react_main_tsx, | ||
'src/main.css': react_main_css, | ||
}, | ||
}, | ||
vue, | ||
angular: { | ||
files: { | ||
'src/app/example.component.html': angular_html, | ||
'src/app/example.component.css': angular_css, | ||
}, | ||
}, | ||
}} | ||
src="usage/v8/segment/swipeable/demo.html" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
```html | ||
<ion-segment> | ||
<ion-segment-button value="first" content-id="first"> | ||
<ion-label>First</ion-label> | ||
</ion-segment-button> | ||
<ion-segment-button value="second" content-id="second"> | ||
<ion-label>Second</ion-label> | ||
</ion-segment-button> | ||
<ion-segment-button value="third" content-id="third"> | ||
<ion-label>Third</ion-label> | ||
</ion-segment-button> | ||
</ion-segment> | ||
<ion-segment-view> | ||
<ion-segment-content id="first">First</ion-segment-content> | ||
<ion-segment-content id="second">Second</ion-segment-content> | ||
<ion-segment-content id="third">Third</ion-segment-content> | ||
</ion-segment-view> | ||
|
||
<style> | ||
ion-segment-view { | ||
height: 150px; | ||
} | ||
ion-segment-content { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
ion-segment-content:nth-of-type(1) { | ||
background: lightpink; | ||
} | ||
ion-segment-content:nth-of-type(2) { | ||
background: lightblue; | ||
} | ||
ion-segment-content:nth-of-type(3) { | ||
background: lightgreen; | ||
} | ||
</style> | ||
``` |
Oops, something went wrong.