-
Notifications
You must be signed in to change notification settings - Fork 5
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
Shop admin liveview polaris #371
base: shop_admin_liveview_barebones
Are you sure you want to change the base?
Shop admin liveview polaris #371
Conversation
## Examples | ||
|
||
<.box border_color="border" border_width="4">Content</.box> | ||
<.box background="bg-magic-hover" border_radius="full" padding={[xs: "400"]} width="586px">Content</.box> |
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.
For reactive attributes we could take a different approach of padding-xs="400"
.
On the one hand, that would require an enumeration of each possible breakpoint for that attribute padding-xs="400" padding-md="600" padding-lg="400" ...
, but on the other hand, it allows us to enforce tokens better. attr :padding-xs, :string, values: Space.tokens()
.
Perhaps a macro that enumerates the attributes for us.
ef2b6dc
to
889856e
Compare
75278fe
to
75da949
Compare
889856e
to
0fe058b
Compare
3c23cec
to
8b2609a
Compare
0fe058b
to
dab8141
Compare
8b2609a
to
32c7c18
Compare
32c7c18
to
033e35a
Compare
dab8141
to
c112f5e
Compare
033e35a
to
318199f
Compare
c112f5e
to
d24ef51
Compare
Tokens are part of the Polaris design system. They enumerate valid values for various options such as colour, border, and spacing. See https://polaris.shopify.com/tokens
…ke box. In some Polaris components, `padding="400"` is translated into `--pc-box-background:var(--p-color-bg-magic-hover);--pc-box-border-radius:var(--p-border-radius-full);--pc-box-padding-xs:var(--p-space-400);--pc-box-padding-block-end-xs:var(--p-space-400);--pc-box-padding-block-start-xs:var(--p-space-400);--pc-box-padding-inline-end-xs:var(--p-space-400);--pc-box-padding-inline-start-xs:var(--p-space-400)`. This adds a tool that makesx that task easier.
Adds the Box component as it is supposed to be a building block for other components. It also turned out to be one of the more complicated components from an attribute perspective.
This is an example of a much simpler component and implementation
This makes importing those files cleaner.
Required adding the ShadowBevel component for support.
318199f
to
617a84c
Compare
This implements the Box and Spinner component from Polaris as Phoenix components.
Box is a complicated component that takes a huge number of attributes.
Spinner on the other hand only takes 3 attributes. This is to demonstrate the difference between those complicated and simple components.
This also adds some of the Polaris Tokens that where relevant to Box. Tokens are part of the Polaris design system the identifies valid values for colours, borders, padding and the like.