Skip to content

Commit ee8cd62

Browse files
fix: remove custom icon in EduToast
1 parent eeab7fa commit ee8cd62

3 files changed

Lines changed: 1 addition & 14 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ A lightweight toast notification for brief status messages, with positioning, au
148148
- `open` (Boolean) - Shows or hides the toast (default: `false`)
149149
- `dismissible` (Boolean) - Shows close button (default: `false`)
150150
- `position` (String) - Position: `'top-right'`, `'top-left'`, `'bottom-right'`, `'bottom-left'` (default: `'top-right'`)
151-
- `icon` (String) - Custom icon (uses default icon per type if not provided)
152151
- `aria-label` (String) - Accessibility label
153152

154153
**Accessibility:**

src/edu-toast/EduToast.stories.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const createStory = args => {
1414
open,
1515
dismissible,
1616
position,
17-
icon,
1817
} = args) => html`
1918
<edu-toast
2019
.message=${message}
@@ -23,7 +22,6 @@ const createStory = args => {
2322
.open=${open}
2423
.dismissible=${dismissible}
2524
.position=${position}
26-
.icon=${icon}
2725
></edu-toast>
2826
`;
2927
story.parameters = {
@@ -63,11 +61,6 @@ const createStory = args => {
6361
description: 'Toast position in the viewport',
6462
name: 'position',
6563
},
66-
icon: {
67-
control: 'text',
68-
description: 'Custom icon (overrides default)',
69-
name: 'icon',
70-
},
7164
};
7265
story.args = args;
7366
return story;
@@ -80,7 +73,6 @@ const defaultArgs = {
8073
open: true,
8174
dismissible: true,
8275
position: 'top-right',
83-
icon: '',
8476
};
8577

8678
export const SuccessTopRightInfinite = createStory({ ...defaultArgs });

src/edu-toast/src/EduToast.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export class EduToast extends LitElement {
3535
open: { type: Boolean, reflect: true },
3636
dismissible: { type: Boolean },
3737
position: { type: String, reflect: true },
38-
icon: { type: String },
3938
ariaLabel: { type: String, attribute: 'aria-label' },
4039
};
4140

@@ -47,7 +46,6 @@ export class EduToast extends LitElement {
4746
this.open = false;
4847
this.dismissible = false;
4948
this.position = POSITION.TOP_RIGHT;
50-
this.icon = '';
5149
this.ariaLabel = '';
5250
this._autoHideTimeout = null;
5351
}
@@ -246,9 +244,7 @@ export class EduToast extends LitElement {
246244
];
247245

248246
render() {
249-
const hasCustomIcon =
250-
typeof this.icon === 'string' && this.icon.trim().length > 0;
251-
const iconToDisplay = hasCustomIcon ? this.icon : this._getDefaultIcon();
247+
const iconToDisplay = this._getDefaultIcon();
252248
const hasMessage =
253249
typeof this.message === 'string' && this.message.trim().length > 0;
254250
const role = this.type === TYPE.ERROR ? 'alert' : 'status';

0 commit comments

Comments
 (0)