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

DIG-4453: Tooltip Component #762

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions components/base/tooltip/tooltip.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{!-- <span>Default Tool Tip</span> --}}
<br /><br />

<div class="tt">
<div class="icon" />
<div class="msg">
This information is collected to ensure the marriage abides by Massachusetts State Law Chapter 207 Sections 1-8.
</div>
</div>

<br /><br /><br />

{{!-- <span>Tool Tip w/`i` icon</span> --}}
<div class="tt">
<div class="icon tt--info" />
<div class="msg">
This information is collected to ensure the marriage abides by Massachusetts State Law Chapter 207 Sections 1-8.
</div>
</div>
3 changes: 3 additions & 0 deletions components/base/tooltip/tooltip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title: ToolTip
handle: tt
status: ready
5 changes: 5 additions & 0 deletions scripts/components/tooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict'
// This module controls the City of Boston table component
// ---------------------------


62 changes: 62 additions & 0 deletions stylesheets/components/tooltip/_component.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*

ToolTip

Base:
tt

Elements:
c = Container
i = icon
w = Tool Tip Wrapper
*/

.tt
position: relative
display: inline-block
margin: 0
padding: 0

.icon
width: 10px
height: 10px
border-radius: 50%
font-size: 0.5rem
background: $optimistic-blue-dark

margin: 5px 0.5em 0 5px
padding: 4.7px 0 0 3.0px
line-height: 0px
color: white

&::before
content: '?'

.tt--info
text-transform: lowercase
padding-left: 3.8px
&::before { content: 'i' }

.msg
display: none
// display: block
position: absolute
font-size: 1.00rem
line-height: normal
background: $grey-000
z-index: 1000
left: 110%
top: -10%

min-width: 200px
max-width: 300px

padding: 0.25em 0.5em
color: $grey-400
font-family: $serif
font-weight: 300
font-style: italic
text-transform: initial

.icon:hover .msg
display: block
7 changes: 7 additions & 0 deletions stylesheets/components/tooltip/base.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*

SECTION HEADER

*/

@require('*.styl')
1 change: 1 addition & 0 deletions stylesheets/variables/_colors.styl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $grey-000 = #f3f3f3
$grey-100 = #e0e0e0
$grey-200 = #C8C8C8
$grey-300 = #828282
$grey-400 = #58585b

$focus-indicator-color = $optimistic-blue-light
$error-border-color = $freedom-red-light
Expand Down