Skip to content

Commit 07c5756

Browse files
committed
fixed changelog, notification icon, and updated button states
1 parent 9487b98 commit 07c5756

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- `intent` property to `Button`, `FieldItem`, `FieldSet`, `Notification`, and `Spinner`
12+
913
## [24.1.0] - 2025-04-16
1014

1115
### Added
@@ -48,7 +52,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
4852
- `operation-format-list-bullet`
4953
- `operation-format-list-checked`
5054
- `operation-format-list-numbered`
51-
- `intent` property to `Button`, `FieldItem`, `FieldSet`, `Notification`, and `Spinner`
5255

5356
### Fixed
5457

src/components/Button/Button.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ const TemplateSemantic: StoryFn<typeof Button> = (args) => (
7171
export const ButtonSemantics = TemplateSemantic.bind({});
7272
ButtonSemantics.args = FullExample.args;
7373

74-
const TemplateState: StoryFn<typeof Button> = (args) => (
74+
const TemplateIntent: StoryFn<typeof Button> = (args) => (
7575
<OverlaysProvider>
76-
<Button {...args} text="Success" hasStateSuccess />
76+
<Button {...args} text="Success" intent="success" />
7777
<Spacing vertical />
78-
<Button {...args} text="Warning" hasStateWarning />
78+
<Button {...args} text="Warning" intent="warning" />
7979
<Spacing vertical />
80-
<Button {...args} text="Danger" hasStateDanger />
80+
<Button {...args} text="Danger" intent="danger" />
8181
</OverlaysProvider>
8282
);
83-
export const ButtonStates = TemplateState.bind({});
84-
ButtonStates.args = FullExample.args;
83+
export const ButtonIntent = TemplateIntent.bind({});
84+
ButtonIntent.args = FullExample.args;
8585

8686
const TemplateContent: StoryFn<typeof Button> = (args) => (
8787
<OverlaysProvider>

src/components/Notification/Notification.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ export const Notification = ({
114114

115115
const intents: Array<NotificationProps["intent"]> = ["info", "success", "warning", "danger"];
116116
const intentClass = intent ? " " + IntentClassNames[intent.toUpperCase()] : "";
117-
const intentIconSymbol = intents.includes(intent) ? `state-${intent}` : "state-info";
117+
const intentIconSymbol = intents.includes(intent) ? `state-${intent}` : iconSymbol;
118118

119119
let notificationIcon = icon !== false ? icon : undefined;
120-
if (icon !== false && !notificationIcon && (!!iconSymbol || !!intentIconSymbol)) {
121-
notificationIcon = <Icon name={(intentIconSymbol || iconSymbol) as ValidIconName} />;
120+
if (icon !== false && !notificationIcon && !!intentIconSymbol) {
121+
notificationIcon = <Icon name={intentIconSymbol as ValidIconName} />;
122122
}
123123

124124
const content = actions ? (

0 commit comments

Comments
 (0)