Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 726b259

Browse files
authored
chore(menu): Remove simple from naming (#625)
Closes #615
1 parent 6fee7bc commit 726b259

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/lib/menu/menu.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import {
1717
} from '@angular/core';
1818
import { isBrowser, toBoolean, EventRegistry } from '@angular-mdc/web/common';
1919

20-
import { MDCMenuAdapter } from '@material/menu/simple/adapter';
21-
import { MDCSimpleMenuFoundation, util, Corner } from '@material/menu';
20+
import { MDCMenuAdapter } from '@material/menu/adapter';
21+
import { MDCMenuFoundation, util, Corner } from '@material/menu';
2222

2323
export type MdcMenuAnchorCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
2424

@@ -48,7 +48,7 @@ export class MdcMenuDivider {
4848
})
4949
export class MdcMenuItems {
5050
@HostBinding('class.mdc-list') isHostClass = true;
51-
@HostBinding('class.mdc-simple-menu__items') isSelectClass = true;
51+
@HostBinding('class.mdc-menu__items') isSelectClass = true;
5252
@HostBinding('attr.role') role: string = 'menu';
5353
@HostBinding('attr.aria-hidden') ariaHidden: string = 'true';
5454

@@ -111,7 +111,7 @@ export class MdcMenu implements AfterViewInit, OnChanges, OnDestroy {
111111
@Input() direction: 'ltr' | 'rtl' = 'ltr';
112112
@Output() cancel: EventEmitter<void> = new EventEmitter<void>();
113113
@Output() select: EventEmitter<any> = new EventEmitter();
114-
@HostBinding('class.mdc-simple-menu') isHostClass = true;
114+
@HostBinding('class.mdc-menu') isHostClass = true;
115115
@HostBinding('tabindex') tabindex: number = -1;
116116
@ViewChild(MdcMenuItems) menuContainer: MdcMenuItems;
117117
@ContentChildren(MdcMenuItem) options: QueryList<MdcMenuItem>;

test/unit/menu/menu.test.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('MdcMenu', () => {
1111
TestBed.configureTestingModule({
1212
imports: [MdcMenuModule],
1313
declarations: [
14-
SimpleTest,
14+
MenuTest,
1515
]
1616
});
1717
TestBed.compileComponents();
@@ -20,20 +20,20 @@ describe('MdcMenu', () => {
2020
describe('basic behaviors', () => {
2121
let testDebugElement: DebugElement;
2222
let testInstance: MdcMenu;
23-
let testComponent: SimpleTest;
23+
let testComponent: MenuTest;
2424

2525
beforeEach(() => {
26-
fixture = TestBed.createComponent(SimpleTest);
26+
fixture = TestBed.createComponent(MenuTest);
2727
fixture.detectChanges();
2828

2929
testDebugElement = fixture.debugElement.query(By.directive(MdcMenu));
3030
testInstance = testDebugElement.componentInstance;
3131
testComponent = fixture.debugElement.componentInstance;
3232
});
3333

34-
it('#should have mdc-simple-menu by default', () => {
34+
it('#should have mdc-menu by default', () => {
3535
expect(testDebugElement.nativeElement.classList)
36-
.toContain('mdc-simple-menu', 'Expected to have mdc-simple-menu');
36+
.toContain('mdc-menu', 'Expected to have mdc-menu');
3737
});
3838

3939
it('#should be closed', () => {
@@ -106,7 +106,7 @@ describe('MdcMenu', () => {
106106
</div>
107107
`,
108108
})
109-
class SimpleTest {
109+
class MenuTest {
110110
anchorCorner: string = 'top-start';
111111
isDisabled: boolean = true;
112112
selectedIndex: number = -1;

0 commit comments

Comments
 (0)