Skip to content

Commit c712d48

Browse files
committed
updated prop name
1 parent ebb2bc3 commit c712d48

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/javascript/components/common/inline-flash-message/index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { InlineNotification } from 'carbon-components-react';
77
*
88
* @param {Object} message - The notification details to display (kind, title, subtitle).
99
* If `null` or `undefined`, no notification is shown.
10-
* @param {Function} setMessage - Callback for handling close button clicks.
10+
* @param {Function} onCloseClick - Callback for handling close button clicks.
1111
* @param {boolean} showCloseButton - Whether to display the close button.
1212
*/
13-
const InlineFlashMessage = ({ message, setMessage, showCloseButton }) => {
13+
const InlineFlashMessage = ({ message, onCloseClick, showCloseButton }) => {
1414
if (!message) return null;
1515

1616
return (
@@ -20,7 +20,7 @@ const InlineFlashMessage = ({ message, setMessage, showCloseButton }) => {
2020
subtitle={message.subtitle || ''}
2121
lowContrast
2222
hideCloseButton={!showCloseButton}
23-
onCloseButtonClick={setMessage}
23+
onCloseButtonClick={onCloseClick}
2424
/>
2525
);
2626
};
@@ -31,13 +31,13 @@ InlineFlashMessage.propTypes = {
3131
title: PropTypes.string,
3232
subtitle: PropTypes.string,
3333
}),
34-
setMessage: PropTypes.func,
34+
onCloseClick: PropTypes.func,
3535
showCloseButton: PropTypes.bool,
3636
};
3737

3838
InlineFlashMessage.defaultProps = {
3939
message: null,
40-
setMessage: () => {},
40+
onCloseClick: () => {},
4141
showCloseButton: true,
4242
};
4343

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
},
113113
"devDependencies": {
114114
"@babel/core": "~7.23.2",
115+
"@babel/eslint-parser": "~7.11.0",
115116
"@babel/plugin-proposal-class-properties": "~7.8.3",
116117
"@babel/plugin-proposal-export-default-from": "~7.8.3",
117118
"@babel/plugin-proposal-export-namespace-from": "~7.8.3",
@@ -123,7 +124,6 @@
123124
"@babel/runtime-corejs3": "~7.9.0",
124125
"angular-mocks": "~1.8.0",
125126
"autoprefixer": "~9.8.0",
126-
"@babel/eslint-parser": "~7.11.0",
127127
"babel-jest": "~25.5.1",
128128
"babel-loader": "~8.2.0",
129129
"compression-webpack-plugin": "^6.1.1",

0 commit comments

Comments
 (0)