mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(ui-components): replace ?? with the || operator in CloseButton (#53990)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user