@@ -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
3838InlineFlashMessage . defaultProps = {
3939 message : null ,
40- setMessage : ( ) => { } ,
40+ onCloseClick : ( ) => { } ,
4141 showCloseButton : true ,
4242} ;
4343
0 commit comments