-
Notifications
You must be signed in to change notification settings - Fork 658
feat(Timeline): add variant prop to Timeline.Badge #7698
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: main
Are you sure you want to change the base?
Changes from all commits
68ea2be
6183698
597ba19
ad48044
a2b5b51
945d812
d94f45f
3750924
1719071
9cbb76b
6984733
f1b494f
c14a447
343a71f
f5d7c71
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,5 @@ | ||
| --- | ||
| '@primer/react': minor | ||
| --- | ||
|
|
||
| Timeline: add `variant` prop to `Timeline.Badge` for built-in color schemes (`accent`, `success`, `attention`, `severe`, `danger`, `done`, `open`, `closed`, `sponsors`) |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,15 +50,28 @@ const TimelineItem = React.forwardRef<HTMLDivElement, TimelineItemProps>( | |||||||||||||||
|
|
||||||||||||||||
| TimelineItem.displayName = 'TimelineItem' | ||||||||||||||||
|
|
||||||||||||||||
| export type TimelineBadgeVariant = | ||||||||||||||||
| | 'accent' | ||||||||||||||||
| | 'success' | ||||||||||||||||
| | 'attention' | ||||||||||||||||
| | 'severe' | ||||||||||||||||
| | 'danger' | ||||||||||||||||
| | 'done' | ||||||||||||||||
| | 'open' | ||||||||||||||||
| | 'closed' | ||||||||||||||||
| | 'sponsors' | ||||||||||||||||
|
|
||||||||||||||||
| export type TimelineBadgeProps = { | ||||||||||||||||
| children?: React.ReactNode | ||||||||||||||||
| className?: string | ||||||||||||||||
| /** The color variant of the badge */ | ||||||||||||||||
|
||||||||||||||||
| /** The color variant of the badge */ | |
| /** | |
| * The color variant of the badge. | |
| * | |
| * Defaults to the "default" styling. Omit this prop or set it to "default" | |
| * for the default appearance; other values render a variant-specific style. | |
| */ |
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.
Added this cause this one is super slow