-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(item-divider): add recipe and tokens #31009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ionic-modular
Are you sure you want to change the base?
Changes from all commits
20a4a33
8295819
38145a3
e2cf0e4
4b170f0
c66561e
fda52f5
eac584c
87e6443
d9db79f
6260629
fd9f0b5
77e50df
3336859
89bcfb4
fc0b992
226beaa
88bfce3
a9f991b
be24a41
8595353
bd9f016
ac44338
02515ef
fd73b43
1c72a1e
b9c7961
e7233e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,201 @@ | ||
| import type { IonPadding, IonMargin } from '../../themes/themes.interfaces'; | ||
|
|
||
| export type IonItemDividerRecipe = { | ||
| background?: string; | ||
| color?: string; | ||
| minHeight?: string; | ||
|
|
||
| padding?: IonPadding; | ||
|
|
||
| inner?: { | ||
| padding?: IonPadding; | ||
| }; | ||
|
|
||
| border?: { | ||
| bottom?: string; | ||
| }; | ||
|
|
||
| font?: { | ||
| size?: string; | ||
| weight?: string; | ||
| }; | ||
|
|
||
| leading?: { | ||
| // Targets `:host([slot="start"])` | ||
| anchor?: { | ||
| margin?: IonMargin; | ||
| }; | ||
|
|
||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
Comment on lines
+23
to
+40
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Naming Convention: Anchors & EdgesTo maintain consistency with the Ionic Modular architecture established in
Why this matters: |
||
|
|
||
| label?: { | ||
| margin?: IonMargin; | ||
| }; | ||
|
|
||
| icon?: { | ||
| font?: { | ||
| size?: string; | ||
| }; | ||
|
|
||
| leading?: { | ||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| // Default non-semantic states | ||
| default?: { | ||
| color?: string; | ||
| }; | ||
|
|
||
| // Any of the semantic colors like primary, secondary, etc. | ||
| semantic?: { | ||
| default?: { | ||
| color?: string; | ||
| }; | ||
| }; | ||
|
Comment on lines
+66
to
+75
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This follows the same structure established in chip when it came to default vs semantic colors. |
||
| }; | ||
|
|
||
| note?: { | ||
| align?: { | ||
| self?: string; | ||
| }; | ||
|
|
||
| font?: { | ||
| size?: string; | ||
| }; | ||
|
|
||
| margin?: IonMargin; | ||
| padding?: IonPadding; | ||
| }; | ||
|
|
||
| avatar?: { | ||
| height?: string; | ||
| width?: string; | ||
|
|
||
| margin?: IonMargin; | ||
|
|
||
| leading?: { | ||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| thumbnail?: { | ||
| height?: string; | ||
| width?: string; | ||
|
|
||
| margin?: IonMargin; | ||
|
|
||
| leading?: { | ||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| header1?: { | ||
| margin?: IonMargin; | ||
| }; | ||
|
|
||
| header2?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| last?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header3?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| last?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header4?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| last?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header5?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| last?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header6?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| last?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| paragraph?: { | ||
| color?: string; | ||
| overflow?: string; | ||
|
|
||
| margin?: IonMargin; | ||
|
|
||
| font?: { | ||
| size?: string; | ||
| }; | ||
|
|
||
| text?: { | ||
| overflow?: string; | ||
| }; | ||
|
|
||
| // Targets `:last-child` | ||
| last?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I noticed:
trailingmeansslot="end"here (and inicon.trailing,avatar.trailing, etc.), but down onheader2.trailing(line 141) it means:last-childwhich is the same meaning chip uses fortrailing. So the same word means two different things within the same recipe. The anchor/edge vocabulary helps but I think this could still trip people up when working across recipes. Worth thinking about whether there's a clearer way to distinguish these?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this? I also had to update it on chip. b9c7961