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

Showcase - Add a demo of RichTooltip applied to and within a Dropdown #2534

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 6 additions & 0 deletions showcase/app/styles/showcase-pages/rich-tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ body.components-rich-tooltip {
}
}
}

.shw-component-rich-tooltip-within-dropdown-toggle {
padding: 20px;
background-color: yellow;
border: 1px solid red;
}
}

// we need to leave this out of the main selector to keep the specificity low
Expand Down
51 changes: 51 additions & 0 deletions showcase/app/templates/components/rich-tooltip.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,57 @@
</SF.Item>
</Shw::Flex>

<Shw::Divider @level={{2}} />

<Shw::Flex @gap="2rem" as |SF|>
<SF.Item @label="Applied to Dropdown ('Soft' only)">
<Hds::RichTooltip @placement="top" as |RT|>
<RT.Toggle>
<Hds::Dropdown @listPosition="bottom-left" as |D|>
<D.ToggleButton @color="secondary" @text="Menu" />
<D.Interactive @href="#">
Lorem ipsum dolor sit amet
</D.Interactive>
<D.Interactive @href="#">
Consectetur adipisicing elit
</D.Interactive>
</Hds::Dropdown>
</RT.Toggle>
<RT.Bubble>
<Shw::Placeholder @text="generic content" @height="30" />
</RT.Bubble>
</Hds::RichTooltip>
</SF.Item>
<SF.Item @label="Within Dropdown ('Soft' only)">
<Hds::Dropdown @listPosition="bottom-left" as |D|>
<D.ToggleButton @color="secondary" @text="Menu" />
<D.Interactive @href="#">
This is a standard interactive item
</D.Interactive>
<D.Generic>
<Hds::RichTooltip @placement="top" as |RT|>
<RT.Toggle>
<Hds::Text::Body
@tag="p"
@size="200"
@color="primary"
class="shw-component-rich-tooltip-within-dropdown-toggle"
>
⚠️ This is a bad idea, don't do it! ⚠️
</Hds::Text::Body>
</RT.Toggle>
<RT.Bubble>
<Shw::Placeholder @text="generic content" @height="30" />
</RT.Bubble>
</Hds::RichTooltip>
</D.Generic>
<D.Interactive @href="#">
This is also a standard interactive item
</D.Interactive>
</Hds::Dropdown>
</SF.Item>
</Shw::Flex>

<Shw::Divider />

<Shw::Text::H2>Base elements</Shw::Text::H2>
Expand Down