Refactor SnackBar API (#9276)
Resolves #9259 ## Changes - Simplified API by removing `title` prop in favor of required `message` prop - Added `detailedMessage` prop for supporting additional context - Updated styling for improved message display - Renamed `defaultTitleByVariant` to `defaultAriaLabelByVariant` for clarity - Adjusted header alignment and icon styling ## Testing - [x] Verified all SnackBar variants display correctly - [x] Tested with and without detailed messages - [x] Checked responsive behavior ## Screenshots   --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -52,19 +52,17 @@ export const RecordShowPageWorkflowHeader = ({
|
||||
assertWorkflowWithCurrentVersionIsDefined(workflowWithCurrentVersion);
|
||||
|
||||
if (!canWorkflowBeTested) {
|
||||
enqueueSnackBar(
|
||||
'Trigger type should be Manual - when no record(s) are selected',
|
||||
{
|
||||
variant: SnackBarVariant.Error,
|
||||
title: 'Workflow cannot be tested',
|
||||
icon: (
|
||||
<IconSettingsAutomation
|
||||
size={16}
|
||||
color={theme.snackBar.error.color}
|
||||
/>
|
||||
),
|
||||
},
|
||||
);
|
||||
enqueueSnackBar('Workflow cannot be tested', {
|
||||
variant: SnackBarVariant.Error,
|
||||
detailedMessage:
|
||||
'Trigger type should be Manual - when no record(s) are selected',
|
||||
icon: (
|
||||
<IconSettingsAutomation
|
||||
size={16}
|
||||
color={theme.snackBar.error.color}
|
||||
/>
|
||||
),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user