diff --git a/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx b/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx index 9aa0e2149eb..da80c53f128 100644 --- a/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx +++ b/packages/@react-spectrum/s2/chromatic/ActionButton.stories.tsx @@ -10,7 +10,9 @@ * governing permissions and limitations under the License. */ -import {ActionButton, ActionButtonProps, Avatar, Text} from '../src'; +import {ActionButton, ActionButtonProps, Avatar, NotificationBadge, Text} from '../src'; +import BellIcon from '../s2wf-icons/S2_Icon_Bell_20_N.svg'; +import CommentIcon from '../s2wf-icons/S2_Icon_Comment_20_N.svg'; import {Fonts, NotificationBadges, UnsafeClassName} from '../stories/ActionButton.stories'; import {generatePowerset} from '@react-spectrum/story-utils'; import type {Meta, StoryObj} from '@storybook/react'; @@ -100,3 +102,13 @@ export const AvatarOnly: ActionButtonStory = { }; export {Fonts, UnsafeClassName, NotificationBadges}; + +export const NotificationBadgesCustomWidth: ActionButtonStory = { + render: (args) => ( +
+ + + Messages + Notifications +
) +}; diff --git a/packages/@react-spectrum/s2/src/ActionButton.tsx b/packages/@react-spectrum/s2/src/ActionButton.tsx index 9d28e68100f..be70cb4396f 100644 --- a/packages/@react-spectrum/s2/src/ActionButton.tsx +++ b/packages/@react-spectrum/s2/src/ActionButton.tsx @@ -73,7 +73,7 @@ export const btnStyles = style