File tree Expand file tree Collapse file tree 8 files changed +99
-2
lines changed
src/components/global/Playground
static/usage/checkbox/indeterminate Expand file tree Collapse file tree 8 files changed +99
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ import Basic from '@site/static/usage/checkbox/basic/index.md';
30
30
31
31
## Indeterminate Checkboxes
32
32
33
- TODO Playground
33
+ import Indeterminate from '@site/static /usage/checkbox/indeterminate/index.md';
34
+
35
+ <Indeterminate />
34
36
35
37
## Theming
36
38
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ export default function Playground({
169
169
* load, so a loading screen is shown by default.
170
170
* Once the source of the iframe loads we can
171
171
* hide the loading screen and show the inner content.
172
- *
172
+ *
173
173
* We call this as a local function because useEffect
174
174
* callbacks cannot return a Promise, as async functions do.
175
175
*/
Original file line number Diff line number Diff line change
1
+ ``` html
2
+ <ion-item >
3
+ <ion-checkbox slot =" start" [indeterminate] =" true" ></ion-checkbox >
4
+ <ion-label >Indeterminate checkbox</ion-label >
5
+ </ion-item >
6
+ ```
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 " />
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
+ < title > Checkbox</ title >
7
+ < link rel ="stylesheet " href ="../../common.css " />
8
+ < script src ="../../common.js "> </ script >
9
+ < script type ="module " src ="https://cdn.jsdelivr.net/npm/@ionic/core@6/dist/ionic/ionic.esm.js "> </ script >
10
+ < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/@ionic/core@6/css/ionic.bundle.css " />
11
+ </ head >
12
+ < body >
13
+ < ion-app >
14
+ < ion-content >
15
+ < div class ="container ">
16
+ < ion-item >
17
+ < ion-checkbox slot ="start " indeterminate ="true "> </ ion-checkbox >
18
+ < ion-label > Indeterminate checkbox</ ion-label >
19
+ </ ion-item >
20
+ </ div >
21
+ </ ion-content >
22
+ </ ion-app >
23
+ </ body >
24
+ </ html >
Original file line number Diff line number Diff line change
1
+ import Playground from '@site/src /components/global/Playground';
2
+
3
+ import javascript from './javascript.md';
4
+ import react from './react.md';
5
+ import vue from './vue.md';
6
+ import angular from './angular.md';
7
+
8
+ <Playground
9
+ code={{
10
+ javascript,
11
+ react,
12
+ vue,
13
+ angular
14
+ }}
15
+ src="usage/checkbox/indeterminate/demo.html"
16
+ />
Original file line number Diff line number Diff line change
1
+ ``` html
2
+ <ion-item >
3
+ <ion-checkbox slot =" start" indeterminate =" true" ></ion-checkbox >
4
+ <ion-label >Indeterminate checkbox</ion-label >
5
+ </ion-item >
6
+ ```
Original file line number Diff line number Diff line change
1
+ ``` tsx
2
+ import React from ' react' ;
3
+ import {
4
+ IonCheckbox ,
5
+ IonItem ,
6
+ IonLabel
7
+ } from ' @ionic/react' ;
8
+
9
+ function Example() {
10
+ return (
11
+ <IonItem >
12
+ <IonCheckbox slot = " start" indeterminate = { true } ></IonCheckbox >
13
+ <IonLabel >Indeterminate checkbox</IonLabel >
14
+ </IonItem >
15
+ );
16
+ }
17
+ export default Example ;
18
+ ```
Original file line number Diff line number Diff line change
1
+ ``` html
2
+ <template >
3
+ <ion-item >
4
+ <ion-checkbox slot =" start" :indeterminate =" true" ></ion-checkbox >
5
+ <ion-label >Indeterminate checkbox</ion-label >
6
+ </ion-item >
7
+ </template >
8
+
9
+ <script lang =" ts" >
10
+ import {
11
+ IonCheckbox ,
12
+ IonItem ,
13
+ IonLabel
14
+ } from ' @ionic/vue' ;
15
+ import { defineComponent } from ' vue' ;
16
+
17
+ export default defineComponent ({
18
+ components: {
19
+ IonCheckbox,
20
+ IonItem,
21
+ IonLabel
22
+ }
23
+ });
24
+ </script >
25
+ ```
You can’t perform that action at this time.
0 commit comments