Skip to content

feat: add overflowMode to S2 Badge #7653

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

Merged
merged 3 commits into from
Jan 24, 2025
Merged

feat: add overflowMode to S2 Badge #7653

merged 3 commits into from
Jan 24, 2025

Conversation

yihuiliao
Copy link
Member

@yihuiliao yihuiliao commented Jan 23, 2025

Closes

also fixes spelling from charteuse to chartreuse

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Jan 23, 2025

@yihuiliao yihuiliao marked this pull request as ready for review January 23, 2025 01:07
snowystinger
snowystinger previously approved these changes Jan 23, 2025
@rspbot
Copy link

rspbot commented Jan 23, 2025

ktabors
ktabors previously approved these changes Jan 23, 2025
snowystinger
snowystinger previously approved these changes Jan 23, 2025
Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yihuiliao yihuiliao dismissed stale reviews from snowystinger and ktabors via 2a94208 January 24, 2025 19:21
@rspbot
Copy link

rspbot commented Jan 24, 2025

@rspbot
Copy link

rspbot commented Jan 24, 2025

## API Changes

@react-spectrum/s2

/@react-spectrum/s2:Badge

 Badge {
   UNSAFE_className?: string
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children: ReactNode
   fillStyle?: 'bold' | 'subtle' | 'outline' = 'bold'
   id?: string
+  overflowMode?: 'wrap' | 'truncate' = 'wrap'
   size?: 'S' | 'M' | 'L' | 'XL' = 'S'
   slot?: string | null
   styles?: StylesProp
-  variant?: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'charteuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver' = 'neutral'
+  variant?: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'chartreuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver' = 'neutral'
 }

/@react-spectrum/s2:BadgeProps

 BadgeProps {
   UNSAFE_className?: string
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children: ReactNode
   fillStyle?: 'bold' | 'subtle' | 'outline' = 'bold'
   id?: string
+  overflowMode?: 'wrap' | 'truncate' = 'wrap'
   size?: 'S' | 'M' | 'L' | 'XL' = 'S'
   slot?: string | null
   styles?: StylesProp
-  variant?: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'charteuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver' = 'neutral'
+  variant?: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'chartreuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver' = 'neutral'
 }

@yihuiliao yihuiliao added this pull request to the merge queue Jan 24, 2025
Merged via the queue into main with commit 873f6fe Jan 24, 2025
29 checks passed
@yihuiliao yihuiliao deleted the s2-badge-overflow branch January 24, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants