forked from mystiq/hydrogen-web
Style links and buttons similarly in menu
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
00dbd3db06
commit
040c744b6a
3 changed files with 13 additions and 5 deletions
|
@ -195,6 +195,11 @@ the layout viewport up without resizing it when the keyboard shows */
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu .menu-item{
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.Settings {
|
.Settings {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
@ -684,14 +684,17 @@ button.link {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu button {
|
.menu li{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu .menu-item{
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
display: block;
|
|
||||||
border: none;
|
border: none;
|
||||||
width: 100%;
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 8px 32px 8px 8px;
|
padding: 8px 32px 8px 8px;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu .destructive button {
|
.menu .destructive button {
|
||||||
|
|
|
@ -37,10 +37,10 @@ export class Menu extends TemplateView {
|
||||||
|
|
||||||
_convertToDOM(option) {
|
_convertToDOM(option) {
|
||||||
if (option.callback) {
|
if (option.callback) {
|
||||||
return tag.button({ onClick: option.callback }, option.label);
|
return tag.button({ className: "menu-item", onClick: option.callback }, option.label);
|
||||||
}
|
}
|
||||||
else if (option.link) {
|
else if (option.link) {
|
||||||
return tag.a({ href: option.link }, option.label);
|
return tag.a({ className: "menu-item", href: option.link }, option.label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue