Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add help-box and improve popover component #83

Merged
merged 3 commits into from Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.html
Expand Up @@ -2660,6 +2660,10 @@ <h2>Popovers @TODO</h2>
<button type="button" class="btn btn-outline-primary" data-container="body" data-toggle="popover" data-placement="right" title="Dismissible popover" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on right (with title)
</button>

<span class="help-box" data-container="body" data-toggle="popover" data-placement="right" title="Dismissible popover" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
<i class="material-icons">info</i>
</span>
</article>

<article id="progress">
Expand Down
11 changes: 11 additions & 0 deletions scss/_help-box.scss
@@ -0,0 +1,11 @@
$component-name: help-box;

.#{$component-name} {
margin: 0 10px;
cursor: pointer;

i {
font-size: 14px;
color: $primary;
}
}
51 changes: 51 additions & 0 deletions scss/_popover.scss
@@ -0,0 +1,51 @@
$component-name: popover;

.#{$component-name} {
padding: 5px;
background: $gray-700;
border: none;

& &-header,
& &-body {
color: #ffffff;
background: none;
border: none;
padding: 0;
}

&.bs-popover-right .arrow {
left: calc((0.5rem) * -1);

&::before,
&::after {
border-right-color: $gray-700;
}
}

&.bs-popover-left .arrow {
right: calc((0.5rem) * -1);

&::before,
&::after {
border-left-color: $gray-700;
}
}

&.bs-popover-bottom .arrow {
top: calc((0.5rem) * -1);

&::before,
&::after {
border-bottom-color: $gray-700;
}
}

&.bs-popover-top .arrow {
bottom: calc((0.5rem) * -1);

&::before,
&::after {
border-top-color: $gray-700;
}
}
}
2 changes: 2 additions & 0 deletions scss/application.scss
Expand Up @@ -21,6 +21,8 @@
// Components
@import "type";
@import "alerts";
@import "help-box";
@import "popover";
@import "badges";
@import "buttons";
@import "button-group";
Expand Down