-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add Card.Icon
#243
Add Card.Icon
#243
Conversation
🦋 Changeset detectedLatest commit: 84cb913 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔍 Design token changes foundView CSS variable changes- --brand-Label-color-default: var(--base-color-scale-blue-5);
+ --brand-Label-color-default: var(--brand-color-text-default); - --brand-Label-color-default: var(--base-color-scale-blue-4);
+ --brand-Label-color-default: var(--brand-color-text-default); - --brand-Label-color-default: var(--base-color-scale-blue-5);
+ --brand-Label-color-default: var(--brand-color-text-default); |
|
3da52bd
to
052baa1
Compare
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.
Looking good!
<Card href="https://github.com"> | ||
<Card.Icon | ||
icon={ | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="20" height="20"> |
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.
Should this be 24x24?
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.
This looks great @josepmartins. Left some 💬 but also pre-emptively approving.
One additional comment: Can we add a playground to Storybook now? With the color variations to Card.Icon and Card.Label, I think it would be helpful to users if they can toggle and preview the colors in Storybook.
Also FYI that your snapshots are out-of-date.
Co-authored-by: Rez <rezrah@github.com>
Co-authored-by: Rez <rezrah@github.com>
Co-authored-by: Rez <rezrah@github.com>
Co-authored-by: Rez <rezrah@github.com>
6741421
to
8e73025
Compare
@rezrah thank you! I've added a basic Playground for icon and label colors, happy to iterate on upcoming PR's if needed: https://primer-e75d38a33c-26139705.drafts.github.io/storybook/?path=/story/components-card--playground @egim I've introduced some changes on the Stacked example: https://primer-e75d38a33c-26139705.drafts.github.io/storybook/?path=/story/components-card-features--stacked |
This is wonderful, we will utilize very soon. Thank you @josepmartins! ❤️ |
Summary
Add
Card.Icon
to theCard
component. This allows usingOcticons
in the Card component to fit future and existing use cases.Icon
Icon + Label
List of notable changes:
Icon
as part of the composable APICard
andLabel
usage.Card
layout to usegrid-template-areas
for the Icon + Label combinationCard
documentationWhat should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
Reviewer checklist:
Screenshots: