Skip to content

Commit

Permalink
docs(note): document custom properties
Browse files Browse the repository at this point in the history
references #14850
  • Loading branch information
camwiegert committed Aug 30, 2018
1 parent 0f9a7b4 commit 88ab4f9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/components/note/note.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
// --------------------------------------------------

:host {
/**
* @prop --color: Color of the note
*/

color: var(--color);

font-family: $font-family-base;
Expand Down
7 changes: 7 additions & 0 deletions core/src/components/note/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Notes are text elements generally used as subtitles that provide more informatio
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `Mode` |


## CSS Custom Properties

| Name | Description |
| --------- | ----------------- |
| `--color` | Color of the note |


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
9 changes: 9 additions & 0 deletions core/src/components/note/test/standalone/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<!-- Default -->
<ion-note>Default Note</ion-note>

<!-- Custom -->
<ion-note class="custom">Custom Note</ion-note>

<!-- Colors -->
<ion-note color="primary">Primary Note</ion-note>
<ion-note color="secondary">Secondary Note</ion-note>
Expand All @@ -36,5 +39,11 @@
<ion-label>Note (Start)</ion-label>
</ion-item>
</ion-list>

<style>
.custom {
--color: hotpink;
}
</style>
</body>
</html>

0 comments on commit 88ab4f9

Please sign in to comment.