1
1
---
2
2
title: "ion-note"
3
- hide_table_of_contents: true
4
- demoUrl: "/docs/demos/api/note/index.html"
5
- demoSourceUrl: "https://github.com/ionic-team/ionic-docs/tree/main/static/demos/api/note/index.html"
6
3
---
7
- import Tabs from '@theme/Tabs';
8
- import TabItem from '@theme/TabItem';
9
- import TOCInline from '@theme/TOCInline';
10
-
11
4
import Props from '@site/static/auto-generated/note/props.md';
12
5
import Events from '@site/static/auto-generated/note/events.md';
13
6
import Methods from '@site/static/auto-generated/note/methods.md';
@@ -24,208 +17,34 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
24
17
25
18
<EncapsulationPill type="shadow" />
26
19
27
- <h2 className="table-of-contents__title">Contents</h2>
28
-
29
- <TOCInline
30
- toc={toc}
31
- maxHeadingLevel={2}
32
- />
33
-
34
-
35
-
36
- Notes are text elements generally used as subtitles that provide more information. Notes are styled to appear grey by default. Notes can be used in an item as metadata text.
37
-
38
-
39
-
40
-
41
- ## Usage
42
-
43
- <Tabs groupId="framework" defaultValue="angular" values={[{ value: 'angular', label: 'Angular' }, { value: 'javascript', label: 'Javascript' }, { value: 'react', label: 'React' }, { value: 'stencil', label: 'Stencil' }, { value: 'vue', label: 'Vue' }]}>
44
-
45
- <TabItem value="angular">
46
-
47
- ```html
48
- <!-- Default Note -->
49
- <ion-note>Default Note</ion-note>
50
-
51
- <!-- Note Colors -->
52
- <ion-note color="primary">Primary Note</ion-note>
53
- <ion-note color="secondary">Secondary Note</ion-note>
54
- <ion-note color="danger">Danger Note</ion-note>
55
- <ion-note color="light">Light Note</ion-note>
56
- <ion-note color="dark">Dark Note</ion-note>
57
-
58
- <!-- Notes in a List -->
59
- <ion-list>
60
- <ion-item>
61
- <ion-label>Note (End)</ion-label>
62
- <ion-note slot="end">On</ion-note>
63
- </ion-item>
64
-
65
- <ion-item>
66
- <ion-note slot="start">Off</ion-note>
67
- <ion-label>Note (Start)</ion-label>
68
- </ion-item>
69
- </ion-list>
70
- ```
71
-
72
-
73
- </TabItem>
74
-
20
+ Notes are text elements generally used as subtitles that provide more information. They are styled to appear grey by default. Notes can be used in an item as metadata text.
75
21
76
- <TabItem value="javascript">
22
+ ## Basic Usage
77
23
78
- ```html
79
- <!-- Default Note -->
80
- <ion-note>Default Note</ion-note>
24
+ import Basic from '@site/static/usage/note/basic/index.md';
81
25
82
- <!-- Note Colors -->
83
- <ion-note color="primary">Primary Note</ion-note>
84
- <ion-note color="secondary">Secondary Note</ion-note>
85
- <ion-note color="danger">Danger Note</ion-note>
86
- <ion-note color="light">Light Note</ion-note>
87
- <ion-note color="dark">Dark Note</ion-note>
26
+ <Basic />
88
27
89
- <!-- Notes in a List -->
90
- <ion-list>
91
- <ion-item>
92
- <ion-label>Note (End)</ion-label>
93
- <ion-note slot="end">On</ion-note>
94
- </ion-item>
28
+ ## Item Notes
95
29
96
- <ion-item>
97
- <ion-note slot="start">Off</ion-note>
98
- <ion-label>Note (Start)</ion-label>
99
- </ion-item>
100
- </ion-list>
101
- ```
30
+ import Item from '@site/static/usage/note/item/index.md';
102
31
32
+ <Item />
103
33
104
- </TabItem>
34
+ ## Theming
105
35
36
+ ### Colors
106
37
107
- <TabItem value="react">
38
+ import Colors from '@site/static/usage/note/theming/colors/index.md';
108
39
109
- ```tsx
110
- import React from 'react';
111
- import { IonNote, IonList, IonItem, IonLabel, IonContent } from '@ionic/react';
40
+ <Colors />
112
41
113
- export const NoteExample: React.FC = () => (
114
- <IonContent>
115
- {/*-- Default Note --*/}
116
- <IonNote>Default Note</IonNote><br />
42
+ ### CSS Custom Properties
117
43
118
- {/*-- Note Colors --*/}
119
- <IonNote color="primary">Primary Note</IonNote><br />
120
- <IonNote color="secondary">Secondary Note</IonNote><br />
121
- <IonNote color="danger">Danger Note</IonNote><br />
122
- <IonNote color="light">Light Note</IonNote><br />
123
- <IonNote color="dark">Dark Note</IonNote><br />
44
+ import CSSProps from '@site/static/usage/note/theming/css-properties/index.md';
124
45
125
- {/*-- Notes in a List --*/}
126
- <IonList>
127
- <IonItem>
128
- <IonLabel>Note (End)</IonLabel>
129
- <IonNote slot="end">On</IonNote>
130
- </IonItem>
46
+ <CSSProps />
131
47
132
- <IonItem>
133
- <IonNote slot="start">Off</IonNote>
134
- <IonLabel>Note (Start)</IonLabel>
135
- </IonItem>
136
- </IonList>
137
- </IonContent>
138
- );
139
- ```
140
-
141
- </TabItem>
142
-
143
-
144
- <TabItem value="stencil">
145
-
146
- ```tsx
147
- import { Component, h } from '@stencil/core';
148
-
149
- @Component({
150
- tag: 'note-example',
151
- styleUrl: 'note-example.css'
152
- })
153
- export class NoteExample {
154
- render() {
155
- return [
156
- // Default Note
157
- <ion-note>Default Note</ion-note>,
158
-
159
- // Note Colors
160
- <ion-note color="primary">Primary Note</ion-note>,
161
- <ion-note color="secondary">Secondary Note</ion-note>,
162
- <ion-note color="danger">Danger Note</ion-note>,
163
- <ion-note color="light">Light Note</ion-note>,
164
- <ion-note color="dark">Dark Note</ion-note>,
165
-
166
- // Notes in a List
167
- <ion-list>
168
- <ion-item>
169
- <ion-label>Note (End)</ion-label>
170
- <ion-note slot="end">On</ion-note>
171
- </ion-item>
172
-
173
- <ion-item>
174
- <ion-note slot="start">Off</ion-note>
175
- <ion-label>Note (Start)</ion-label>
176
- </ion-item>
177
- </ion-list>
178
- ];
179
- }
180
- }
181
- ```
182
-
183
-
184
- </TabItem>
185
-
186
-
187
- <TabItem value="vue">
188
-
189
- ```html
190
- <template>
191
- <!-- Default Note -->
192
- <ion-note>Default Note</ion-note>
193
-
194
- <!-- Note Colors -->
195
- <ion-note color="primary">Primary Note</ion-note>
196
- <ion-note color="secondary">Secondary Note</ion-note>
197
- <ion-note color="danger">Danger Note</ion-note>
198
- <ion-note color="light">Light Note</ion-note>
199
- <ion-note color="dark">Dark Note</ion-note>
200
-
201
- <!-- Notes in a List -->
202
- <ion-list>
203
- <ion-item>
204
- <ion-label>Note (End)</ion-label>
205
- <ion-note slot="end">On</ion-note>
206
- </ion-item>
207
-
208
- <ion-item>
209
- <ion-note slot="start">Off</ion-note>
210
- <ion-label>Note (Start)</ion-label>
211
- </ion-item>
212
- </ion-list>
213
- </template>
214
-
215
- <script>
216
- import { IonItem, IonLabel, IonList, IonNote } from '@ionic/vue';
217
- import { defineComponent } from 'vue';
218
-
219
- export default defineComponent({
220
- components: { IonItem, IonLabel, IonList, IonNote }
221
- });
222
- </script>
223
- ```
224
-
225
-
226
- </TabItem>
227
-
228
- </Tabs>
229
48
230
49
## Properties
231
50
<Props />
@@ -243,4 +62,4 @@ export default defineComponent({
243
62
<CustomProps />
244
63
245
64
## Slots
246
- <Slots />
65
+ <Slots />
0 commit comments