fix(ui-components): replace ?? with the || operator in CloseButton (#53990)

This commit is contained in:
Nitish sharma
2024-03-07 01:51:02 +05:30
committed by GitHub
parent f74a276fcd
commit 87762e9a93
2 changed files with 2 additions and 5 deletions
@@ -9,10 +9,7 @@ const story = {
type Story = StoryObj<typeof CloseButton>;
export const Basic: Story = {
args: {
className: '',
label: ''
}
args: {}
};
export default story;
@@ -48,7 +48,7 @@ export function CloseButton({
return (
<button className={classes} onClick={onClick} type='button'>
<span className='sr-only'>{label ?? 'Close'}</span>
<span className='sr-only'>{label || 'Close'}</span>
<span aria-hidden>×</span>
</button>
);