-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
206 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,73 @@ | ||
:host { | ||
.speed-dial { | ||
display: inline-block; | ||
&-container { | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
} | ||
&-trigger { | ||
z-index: 20; | ||
order: 2; | ||
} | ||
&-actions { | ||
display: flex; | ||
order: 1; | ||
} | ||
&-action, | ||
button { | ||
transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); | ||
} | ||
} | ||
|
||
.speed-dial-container { | ||
position: relative; | ||
display: flex; | ||
.speed-dial-container.up { | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.speed-dial-trigger { | ||
z-index: 20; | ||
order: 2; | ||
} | ||
|
||
.speed-dial-actions { | ||
display: flex; | ||
flex-direction: column-reverse; | ||
order: 1; | ||
>button { | ||
margin-bottom: 10px; | ||
transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); | ||
.speed-dial-actions { | ||
flex-direction: column-reverse; | ||
.spped-dial-action { | ||
margin-bottom: 10px; | ||
} | ||
} | ||
} | ||
|
||
.speed-dial-container.down { | ||
flex-direction: column; | ||
.speed-dial-trigger { | ||
order: 1; | ||
} | ||
.speed-dial-actions { | ||
flex-direction: column; | ||
.spped-dial-action { | ||
margin-top: 10px; | ||
} | ||
} | ||
.speed-dial-actions button { | ||
margin-top: 10px; | ||
} | ||
} | ||
|
||
.speed-dial-container.left { | ||
flex-direction: row; | ||
.speed-dial-trigger { | ||
order: 2; | ||
} | ||
.speed-dial-actions { | ||
flex-direction: row-reverse; | ||
order: 1; | ||
.spped-dial-action { | ||
margin-right: 10px; | ||
} | ||
} | ||
} | ||
|
||
.speed-dial-container.right { | ||
flex-direction: row; | ||
.speed-dial-trigger { | ||
order: 1; | ||
} | ||
.speed-dial-actions { | ||
order: 2; | ||
.spped-dial-action { | ||
margin-left: 10px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# speed-dial | ||
|
||
## Usage | ||
|
||
### default | ||
``` | ||
<stbui-speed-dial> | ||
<button mat-mini-fab> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>edit</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
</stbui-speed-dial> | ||
``` | ||
|
||
### setting open properties | ||
``` | ||
<stbui-speed-dial open="true"> | ||
<button mat-mini-fab> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>edit</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
</stbui-speed-dial> | ||
``` | ||
open value | ||
* false | ||
* true | ||
|
||
### setting position properties | ||
``` | ||
<stbui-speed-dial position="down"> | ||
<button mat-mini-fab> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>edit</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
</stbui-speed-dial> | ||
``` | ||
position value | ||
* up | ||
* down | ||
* left | ||
* right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,63 @@ | ||
<mat-card class="fab-demo-actions"> | ||
<mat-card> | ||
<mat-card-title>speed dial</mat-card-title> | ||
<mat-card-subtitle>default</mat-card-subtitle> | ||
<stbui-speed-dial> | ||
<button mat-mini-fab> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>edit</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
</stbui-speed-dial> | ||
</mat-card> | ||
|
||
<mat-card> | ||
<mat-card-title>speed dial</mat-card-title> | ||
<mat-card-subtitle>Options</mat-card-subtitle> | ||
<p> | ||
Direction: | ||
<mat-radio-group [(ngModel)]="direction" name="direction"> | ||
<mat-radio-button value="up">Up</mat-radio-button> | ||
<mat-radio-button value="down">Down</mat-radio-button> | ||
<mat-radio-button value="left">Left</mat-radio-button> | ||
<mat-radio-button value="right">Right</mat-radio-button> | ||
</mat-radio-group> | ||
</p> | ||
<p> | ||
<mat-slide-toggle [(ngModel)]="open">Open</mat-slide-toggle> | ||
</p> | ||
<mat-card-subtitle>position: down</mat-card-subtitle> | ||
<stbui-speed-dial open="true" position="down"> | ||
<button mat-mini-fab> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>edit</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
</stbui-speed-dial> | ||
</mat-card> | ||
|
||
<mat-card> | ||
<mat-card-title>Click me</mat-card-title> | ||
<stbui-speed-dial></stbui-speed-dial> | ||
<mat-card-title>speed dial</mat-card-title> | ||
<mat-card-subtitle>position: left</mat-card-subtitle> | ||
<stbui-speed-dial open="true" position="left"> | ||
<button mat-mini-fab> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>edit</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
</stbui-speed-dial> | ||
</mat-card> | ||
|
||
<mat-card> | ||
<mat-card-title>speed dial</mat-card-title> | ||
<mat-card-subtitle>position: right</mat-card-subtitle> | ||
<stbui-speed-dial open="true" position="right"> | ||
<button mat-mini-fab> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>edit</mat-icon> | ||
</button> | ||
<button mat-mini-fab> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
</stbui-speed-dial> | ||
</mat-card> |