Skip to content

Commit

Permalink
Pill updates - updated colors, small pills are bigger for a11y (#2154)
Browse files Browse the repository at this point in the history
## Summary:
Some updates need to be made to pill so they're more usable
within webapp.

- small size needs 14px font and 24px height
- Banner colors included
- Needs fixed height
- Needs a story for vertically stacked pills

More context for some of these changes can be found in
the following slack thread:
https://khanacademy.slack.com/archives/C8Z9DSKC7/p1693923761646739

Issue: https://khanacademy.atlassian.net/browse/WB-1602

## Test plan:
`yarn jest packages/wonder-blocks-pill/src/components/__tests__/pill.test.tsx`

Storybook
- All variants
  /?path=/story/pill--variants
- Vertically stacked pills
  /?path=/story/pill--vertically-stacked

Author: nishasy

Reviewers: nishasy, jandrade

Required Reviewers:

Approved By: jandrade

Checks: ❌ codecov/project, ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 20.x), ✅ Check build sizes (ubuntu-latest, 20.x), ✅ Test (ubuntu-latest, 20.x, 2/2), ✅ Lint (ubuntu-latest, 20.x), ✅ Test (ubuntu-latest, 20.x, 1/2), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ⏭️  Chromatic - Skip on Release PR (changesets), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, ⏭️  dependabot

Pull Request URL: #2154
  • Loading branch information
nishasy authored Jan 4, 2024
1 parent f6f9a28 commit 80592e7
Show file tree
Hide file tree
Showing 8 changed files with 447 additions and 135 deletions.
6 changes: 6 additions & 0 deletions .changeset/witty-crabs-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/wonder-blocks-theming": minor
"@khanacademy/wonder-blocks-pill": minor
---

Added more colors to Pill, small pills are now 24px tall with 14px font size. Tokens (theming) now include pill colors.
14 changes: 12 additions & 2 deletions __docs__/wonder-blocks-pill/pill.argtypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,22 @@ export default {
description: "Kind of pill.",
defaultValue: "neutral",
table: {
type: {summary: `"neutral" | "accent"`},
type: {
summary: `"neutral" | "accent | "info" | "success" |
"warning" | "critical"`,
},
defaultValue: {summary: "neutral"},
},
type: {
name: "enum",
value: ["neutral", "accent"],
value: [
"neutral",
"accent",
"info",
"success",
"warning",
"critical",
],
required: false,
},
},
Expand Down
Loading

0 comments on commit 80592e7

Please sign in to comment.