Skip to content

Commit

Permalink
Floating Action Button: fixes according to the guideline
Browse files Browse the repository at this point in the history
[Issue] #1322
[Problem] Floating Action button - implementation and example
[Solution]
 - modification of widget styles
 - example has been added

Signed-off-by: Tomasz Lukawski <t.lukawski@samsung.com>
  • Loading branch information
TomaszLukawskiSam committed Jul 22, 2020
1 parent f200a3e commit f245cdc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/mobile/UIComponents/components/buttons/fab.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="ui-appbar-left-icons-container">
<a href="#" class="ui-btn ui-btn-icon ui-btn-icon-back" data-style="flat" data-rel="back"></a>
</div>
<h1>Title</h1>
<h1>Floating Action Button</h1>
</header>
<div class="ui-content">
<button data-icon="add" data-style="fab"></button>
Expand Down
5 changes: 5 additions & 0 deletions examples/mobile/UIComponents/components/buttons/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ <h1>
Contained Button
</a>
</li>
<li class="ui-li-anchor">
<a href="fab.html">
Floating Action Button
</a>
</li>
</ul>
</div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions src/css/profile/mobile/common/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
:root {
// FAB
--button-fab-radius: 50%;
--button-fab-color: var(--primary-color);
--button-fab-icon-color: var(--color-white);


Expand Down Expand Up @@ -550,15 +549,18 @@ a.ui-btn {
bottom: var(--button-fab-bottom);
width: var(--button-fab-width);
height: var(--button-fab-height);
background-color: var(--button-fab-color);
background-color: var(--primary-color);
z-index: 1000;
border-radius: var(--button-fab-radius);
&::after {
background-color: var(--button-fab-icon-color);
width: var(--button-fab-icon-width);
height: var(--button-fab-icon-height);
}
}
&.ui-btn-active.ui-btn-icon::after {
background-color: var(--button-fab-icon-color);
}
}
.ui-btn-content {
width: 90 * @px_base;
display: flex;
Expand Down

0 comments on commit f245cdc

Please sign in to comment.