From ddc88dcf894e74d379cb589d8ddb1e4678b42527 Mon Sep 17 00:00:00 2001 From: Dawid Harat Date: Sat, 7 Dec 2019 23:47:06 +0100 Subject: [PATCH 1/2] buttons docs fulfilled --- pages/_docs/buttons.md | 101 +++++++++++++++++++++++++++++------------ 1 file changed, 73 insertions(+), 28 deletions(-) diff --git a/pages/_docs/buttons.md b/pages/_docs/buttons.md index ec1b5902b..d4ee80f3e 100644 --- a/pages/_docs/buttons.md +++ b/pages/_docs/buttons.md @@ -23,18 +23,22 @@ Use any of the available button classes to quickly create a styled button . We p {% example html wrapper=btn-list %} {% for button in site.button-variants %} -{{ button[1].title }} +{% assign btn-color = button[1].class %} +{% assign btn-title = button[1].title %} +{% include_cached ui/button.html color=btn-color text=btn-title %} {% endfor %} {% endexample %} ### Disabled buttons Make buttons look inactive by adding the disabled boolean attribute to any `.btn` element. ``s don’t support the disabled attribute, so you must add the `.disabled` class to make it visually appear disabled. + {% example html wrapper=btn-list %} {% for button in site.button-variants %} -{% include_cached ui/button.html color=button.1.class text=button.title disabled=true %} +{% assign btn-color = button[1].class %} +{% assign btn-title = button[1].title %} +{% include_cached ui/button.html color=btn-color text=btn-title disabled=true %} {% endfor %} - {% endexample %} @@ -54,7 +58,9 @@ Add `.btn-square` to button to remove border-radius. {% example html wrapper=btn-list %} {% for button in site.button-variants %} -{% include_cached ui/button.html text=button.title color=button.class square=true %} +{% assign btn-color = button[1].class %} +{% assign btn-title = button[1].title %} +{% include_cached ui/button.html color=btn-color text=btn-title square=true %} {% endfor %} {% endexample %} @@ -64,7 +70,9 @@ Add `.btn-pill` class to any button to make them more rounded. {% example html wrapper=btn-list %} {% for button in site.button-variants %} -{% include_cached ui/button.html text=button.title color=button.class pill=true %} +{% assign btn-color = button[1].class %} +{% assign btn-title = button[1].title %} +{% include_cached ui/button.html color=btn-color text=btn-title pill=true %} {% endfor %} {% endexample %} @@ -74,7 +82,9 @@ In need of a button, but not the hefty background colors they bring? Replace the {% example html wrapper=btn-list %} {% for button in site.button-variants %} -{% include_cached ui/button.html text=button.title color=button.class outline=true %} +{% assign btn-color = button[1].class %} +{% assign btn-title = button[1].title %} +{% include_cached ui/button.html text=btn-title color=btn-color outline=true %} {% endfor %} {% endexample %} @@ -103,13 +113,33 @@ Create block level buttons—those that span the full width of a parent—by add Basic buttons are traditional buttons with borders and background with an extra commponent like an icon. You can place it either on the left or the right which ever you want with different color opitons. +Icons can be found [**here** {% include_cached ui/icon.html icon="search" class="icon-sm2" %}](/docs/icons.html#icons) + {% example html wrapper=btn-list %} - - - - - - + + + + + + {% endexample %} ### Social buttons @@ -118,7 +148,10 @@ A button can be formatted to link to a social website {% example html wrapper=btn-list %} {% for button in site.socials %} -{% include_cached ui/button.html color=button.name icon=button.icon text=button.title %} +{% assign btn-icon = button[1].icon %} +{% assign btn-title = button[1].title %} +{% assign btn-color = button[0] %} +{% include_cached ui/button.html color=btn-color icon=btn-icon text=btn-title %} {% endfor %} {% endexample %} @@ -126,7 +159,9 @@ You can use only icons. {% example html wrapper=btn-list %} {% for button in site.socials %} -{% include_cached ui/button.html color=button.name icon=button.icon %} +{% assign btn-icon = button[1].icon %} +{% assign btn-color = button[0] %} +{% include_cached ui/button.html color=btn-color icon=btn-icon icon-only=true %} {% endfor %} {% endexample %} @@ -135,13 +170,27 @@ You can use only icons. Icon only button. Add `.btn-icon` class to remove unnecessary padding from button. {% example html wrapper=btn-list %} - - - - - - - + + + + + + + {% endexample %} ### Button dropdown @@ -151,7 +200,7 @@ Wrap the dropdown’s toggle (your button or link) and the dropdown menu within {% example html wrapper=btn-list %}