mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
action menu update
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import {NgElement, Component, Template, Parent} from 'angular2/angular2'
|
||||
import {ComponentConfig} from 'ionic2/config/component-config'
|
||||
import {Icon} from 'ionic2/components/icon/icon'
|
||||
import {Item} from 'ionic2/components/item/item'
|
||||
|
||||
export let ActionMenuConfig = new ComponentConfig('action-menu')
|
||||
|
||||
@@ -13,23 +15,29 @@ export let ActionMenuConfig = new ComponentConfig('action-menu')
|
||||
<div class="overlay-container">
|
||||
<div class="action-menu-container">
|
||||
|
||||
<div class="action-menu-group">
|
||||
<div class="action-menu-label">Action Menu Label</div>
|
||||
<button class="button action-menu-button">Button 1</button>
|
||||
<button class="button action-menu-button">Button 2</button>
|
||||
<div class="list-header">Action Menu List Header</div>
|
||||
<div class="list">
|
||||
<button ion-item class="item">
|
||||
Button 1
|
||||
</button>
|
||||
<button ion-item class="item">
|
||||
Button 2
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="action-menu-group">
|
||||
<div class="action-menu-label">Action Menu Label</div>
|
||||
<button class="button action-menu-button">Button 1</button>
|
||||
<button class="button action-menu-button">Button 2</button>
|
||||
<div class="list-header">Action Menu Label</div>
|
||||
<div class="list">
|
||||
<button ion-item class="item">Button 1</button>
|
||||
<button ion-item class="item">Button 2</button>
|
||||
</div>
|
||||
|
||||
<div class="action-menu-group">
|
||||
<button class="button action-menu-button">Button 1</button>
|
||||
<div class="list">
|
||||
<button ion-item class="item">Button 1</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>`
|
||||
</div>`,
|
||||
directives: [Item,Icon]
|
||||
})
|
||||
export class ActionMenu {
|
||||
constructor(
|
||||
@@ -37,8 +45,6 @@ export class ActionMenu {
|
||||
@NgElement() ngElement:NgElement
|
||||
) {
|
||||
this.domElement = ngElement.domElement
|
||||
this.domElement.classList.add('pane')
|
||||
this.domElement.classList.add('pane-overlay')
|
||||
this.config = configFactory.create(this)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,21 +14,14 @@ $action-menu-button-text-color: #007aff !default;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
|
||||
.list,
|
||||
.list-header {
|
||||
width: $action-menu-width;
|
||||
max-width: $action-menu-max-width;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.action-menu-group {
|
||||
width: $action-menu-width;
|
||||
max-width: $action-menu-max-width;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.action-menu-group .action-menu-label {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.action-menu-group .action-menu-button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ $action-menu-ios-label-font-size: 1.3rem !default;
|
||||
$action-menu-ios-button-color: #007aff !default;
|
||||
$action-menu-ios-button-font-size: 2rem !default;
|
||||
|
||||
$action-menu-ios-icon-font-size: 1.4em !default;
|
||||
|
||||
|
||||
.action-menu-ios {
|
||||
text-align: center;
|
||||
@@ -68,4 +70,15 @@ $action-menu-ios-button-font-size: 2rem !default;
|
||||
border-bottom-right-radius: $action-menu-ios-border-radius;
|
||||
}
|
||||
|
||||
.action-menu-container icon {
|
||||
@include flex-display();
|
||||
@include flex-align-items(center);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
padding: 0 10px 2px;
|
||||
font-size: $action-menu-ios-icon-font-size;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from 'ionic2/components/item/item-swipe-buttons'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-item'
|
||||
selector: 'ion-item,[ion-item]'
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
|
||||
@@ -13,9 +13,13 @@ $item-padding: 15px !default;
|
||||
@include flex-justify-content(space-between);
|
||||
@include flex-align-items(center);
|
||||
|
||||
width: 100%;
|
||||
min-height: $item-min-height;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: none;
|
||||
text-align: initial;
|
||||
}
|
||||
|
||||
ion-primary-swipe-buttons,
|
||||
|
||||
Reference in New Issue
Block a user