Skip to content

Commit 8df3307

Browse files
authored
Merge pull request #8260 from IgniteUI/simeonoff/fix-8257
fix(toast): compatibility enum const and type
2 parents 4075879 + f8d1287 commit 8df3307

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

projects/igniteui-angular/src/lib/toast/toast.component.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,24 @@ import {
2626
VerticalAlignment,
2727
GlobalPositionStrategy,
2828
} from '../services/public_api';
29+
import { mkenum } from '../core/utils';
2930

3031
let NEXT_ID = 0;
3132

3233
/**
3334
* Enumeration for toast position
3435
* Can be:
35-
* bottom
36-
* middle
37-
* top
36+
* Bottom
37+
* Middle
38+
* Top
3839
*/
39-
export enum IgxToastPositionEnum {
40-
bottom,
41-
middle,
42-
top,
43-
}
40+
export const IgxToastPosition = mkenum({
41+
Bottom: 'bottom',
42+
Middle: 'middle',
43+
Top: 'top'
44+
});
4445

45-
export type IgxToastPosition = keyof typeof IgxToastPositionEnum;
46+
export type IgxToastPosition = (typeof IgxToastPosition)[keyof typeof IgxToastPosition];
4647

4748
/**
4849
* **Ignite UI for Angular Toast** -

0 commit comments

Comments
 (0)