Skip to content

Commit

Permalink
Merge 614fd04 into 3898d65
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Oct 22, 2019
2 parents 3898d65 + 614fd04 commit b6fd742
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Material-Design-Lite-Demo/MDLDemoLibrary.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -624,18 +624,18 @@ code.nosupport::before {
background-color: white;
}

.renderLowerLeftMenuOn .container, .renderLowerRightMenuOn .container, .renderTopLeftMenuOn .container, .renderTopRightMenuOn .container {
.renderLowerLeftMenuOn .container, .renderLowerRightMenuOn .container, .renderTopLeftMenuOn .container, .renderTopRightMenuOn .container, .renderMenuWithAnchorsOn .container {
position: relative;
width: 200px;
}

.renderLowerLeftMenuOn .background, .renderLowerRightMenuOn .background, .renderTopLeftMenuOn .background, .renderTopRightMenuOn .background {
.renderLowerLeftMenuOn .background, .renderLowerRightMenuOn .background, .renderTopLeftMenuOn .background, .renderTopRightMenuOn .background, .renderMenuWithAnchorsOn .background {
background: white;
height: 148px;
width: 100%;
}

.renderLowerLeftMenuOn .bar, .renderLowerRightMenuOn .bar, .renderTopLeftMenuOn .bar, .renderTopRightMenuOn .bar {
.renderLowerLeftMenuOn .bar, .renderLowerRightMenuOn .bar, .renderTopLeftMenuOn .bar, .renderTopRightMenuOn .bar, .renderMenuWithAnchorsOn .bar {
box-sizing: border-box;
background: #3F51B5;
color: white;
Expand Down
36 changes: 34 additions & 2 deletions src/Material-Design-Lite-Demo/MDLMenusScreen.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ MDLMenusScreen >> bottomMenus [
yourself
]

{ #category : #sections }
MDLMenusScreen >> menuWithAnchors [
^ OrderedDictionary new
add: 'Menu with anchors' -> #renderMenuWithAnchorsOn:;
yourself
]

{ #category : #demos }
MDLMenusScreen >> renderLowerLeftMenuOn: html [
html div
Expand Down Expand Up @@ -75,12 +82,37 @@ MDLMenusScreen >> renderLowerRightMenuOn: html [
html div class: 'background' ]
]

{ #category : #demos }
MDLMenusScreen >> renderMenuWithAnchorsOn: html [
html div
class: 'container';
shadow: 2;
with: [ html div
class: 'bar';
with: [ html mdlButton icon
id: #menuWithAnchors;
with: [ html mdlIcon: #more_vert ].
html mdlMenu
bottomLeft;
for: #menuWithAnchors;
with: [ 1 to: 5 do: [ :ind |
html
mdlMenuItem: [ html anchor
callback: [ ('Action ' , ind asString) traceCr ];
with: 'Action ' , ind asString ] ] ] ].
html div class: 'background' ]
]

{ #category : #rendering }
MDLMenusScreen >> renderScreenContentOn: html [
html paragraph: [ html small: 'Note: The menu requires a non-static positioned parent element. Positioning options may not work properly if the menu is inside of a statically positioned node.' ].
html
paragraph: [ html
small:
'Note: The menu requires a non-static positioned parent element. Positioning options may not work properly if the menu is inside of a statically positioned node.' ].
self
render: self bottomMenus on: html;
render: self topMenus on: html
render: self topMenus on: html;
render: self menuWithAnchors on: html
]

{ #category : #demos }
Expand Down

0 comments on commit b6fd742

Please sign in to comment.