-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tooltip to facet with description
- Loading branch information
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
:popover-open { | ||
width: 200px; | ||
height: 100px; | ||
position: absolute; | ||
inset: unset; | ||
bottom: 5px; | ||
right: 5px; | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
import popovers from './popover.twig'; | ||
|
||
/** | ||
* Storybook Definition. | ||
*/ | ||
export default { title: 'Atoms/popover ' }; | ||
|
||
export const popover = () => ( | ||
<div dangerouslySetInnerHTML={{ __html: popovers({}) }} /> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<p style="margin-top: 100px;"> | ||
<button popovertarget="my-popover">Open Popover</button> | ||
<div popover id="my-popover">Greetings, one and all!</div> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{# | ||
/** | ||
* @file | ||
* Default theme implementation of a facet result item. | ||
* | ||
* Available variables: | ||
* - value: The item value. | ||
* - raw_value: The raw item value. | ||
* - show_count: If this facet provides count. | ||
* - count: The amount of results. | ||
* - is_active: The item is active. | ||
* - facet: The facet for this result item. | ||
* - id: the machine name for the facet. | ||
* - label: The facet label. | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
{% if is_active %} | ||
<span class="facet-item__status js-facet-deactivate">(-)</span> | ||
{% endif %} | ||
{% if term_description %} | ||
<span class="facet-item__value tooltip" data-tooltip="{{ term_description }}">{{ value }}</span> | ||
{% else %} | ||
<span class="facet-item__value">{{ value }}</span> | ||
{% endif %} | ||
{% if show_count %} | ||
<span class="facet-item__count">({{ count }})</span> | ||
{% endif %} |