Add Reduce Animation Setting
This commit is contained in:
1 parent
9043aa0535
commit
4974a699dc
15 files changed
+125
-103
No files matched your search
@@ -22,7 +22,6 @@ export interface DropdownOption {
|
||||
"isOpen() && focusedIndex() >= 0 ? dropdownId + '-option-' + focusedIndex() : null",
|
||||
'[attr.aria-label]': 'ariaLabel()',
|
||||
'[class.open]': 'isOpen()',
|
||||
'[class.reduce-motion]': 'reduceMotion()',
|
||||
tabindex: '0',
|
||||
'(click)': 'toggle()',
|
||||
'(keydown.enter)': 'onEnter($event)',
|
||||
@@ -47,12 +46,6 @@ export class Dropdown implements OnInit {
|
||||
private static nextId = 0;
|
||||
dropdownId = `dropdown-${Dropdown.nextId++}`;
|
||||
|
||||
reduceMotion = input<boolean>(
|
||||
typeof window !== 'undefined'
|
||||
? window.matchMedia('(prefers-reduced-motion: reduce)').matches
|
||||
: false,
|
||||
);
|
||||
|
||||
constructor(private el: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
Reference in new issue
Block a user