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

Tooltip documentation #1955

Merged
merged 1 commit into from
Jun 21, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@
border: 1px solid darken($color-7, 10%);
}
}

table.with-actions-borders {
th, td {
&.actions {
border-right: 1px solid #cee1f4 !important;
border-bottom: 1px solid #cee1f4 !important;
}
}
}
}

.color-variables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,48 @@
<div class="style-guide-code">
<pre><code class="language-html"><%= escape_once snippet %></code></pre>
</div>
<br/>
<%- info_tooltip = capture do %>
<a title="Some info." class="fa fa-info-circle with-tip" href="#"></a>
<%- end %>
<table class="with-actions-borders">
<thead>
<tr>
<th> Type </th>
<th> Example </th>
<th> Code </th>
</tr>
</thead>
<tbody>
<tr>
<td>
<b>Info tooltips</b>
These are used to add supplementary information to form labels.
The info icon is the coverable area for this tooltip and should be placed at the right side of the form label.
</td>
<td class="align-center">
<%= info_tooltip %>
</td>
<td>
<div class="style-guide-code">
<pre><code class="language-html"><%= escape_once info_tooltip %></code></pre>
</div>
</td>
</tr>
<tr>
<td>
<b>Adding icon tooltips</b>
These are used to add textual context to the action icons used with tabular data like edit, delete, and clone.
They are styled with a similar colour to the icon that they’re attached to.
</td>
<td class="align-center actions">
<%= link_to_edit_url('#', title: 'edit', no_text: true) %>
</td>
<td>
<div class="style-guide-code">
<pre><code class="language-html"><%= escape_once link_to_edit_url('#', title: 'edit', no_text: true) %></code></pre>
</div>
</td>
</tr>
</tbody>
</table>