Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!-- Tooltip with Primer::Beta::Button -->
<button id="button-with-tooltip" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content">
<span class="Button-label">Button</span>
</span>
</button><tool-tip id="tooltip-16593c4f-c3b9-45b0-a0d6-4dd3899d7374" for="button-with-tooltip" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You can press a button</tool-tip>
<!-- Tooltip with Primer::Beta::Link -->
<span data-view-component="true" class="position-relative"><a id="link-with-tooltip" href="#link-with-tooltip" data-view-component="true" class="Link">Button</a><tool-tip id="tooltip-9e1af3f4-7670-42eb-a8d9-01f625eb87c2" for="link-with-tooltip" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You can press a button</tool-tip></span>
<!-- Tooltip with Primer::IconButton -->
<button id="icon-button-d580e7bd-4ca5-41f8-98f8-e33b45911b82" aria-labelledby="tooltip-60b9f4da-a9ec-429b-9b77-29fc9e8dfb77" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search Button-visual">
<path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path>
</svg>
</button><tool-tip id="tooltip-60b9f4da-a9ec-429b-9b77-29fc9e8dfb77" for="icon-button-d580e7bd-4ca5-41f8-98f8-e33b45911b82" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Search</tool-tip>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Tooltip with Primer::Beta::Button
render(Primer::Beta::Button.new(id: "button-with-tooltip")) do |component|
component.with_tooltip(text: tooltip_text, direction: direction)
"Button"
end
# Tooltip with Primer::Beta::Link
render(Primer::Beta::Link.new(href: "#link-with-tooltip", id: "link-with-tooltip")) do |component|
component.with_tooltip(text: tooltip_text, direction: direction)
"Button"
end
# Tooltip with Primer::IconButton
render(Primer::Beta::IconButton.new(icon: :search, "aria-label": tooltip_text, tooltip_direction: direction))

No assets to display.