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

docs(Dropdown): LPD-41311 Update Clay Documentation for Caret Icon Usage #5893

Merged
merged 1 commit into from
Nov 14, 2024
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
12 changes: 12 additions & 0 deletions packages/clay-drop-down/docs/drop-down.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import {
- [Value](#value)
- [Without Trigger](#without-trigger)
- [Variants](#variants)
- [Icon](#icon)
- [With Items](#with-items)
- [Customizable Trigger Icon](#customizable-trigger-icon)
- [Cascading Menu](#cascading-menu)
- [Drilldown](#drilldown)
- [Caveats](#caveats)
Expand Down Expand Up @@ -249,12 +251,22 @@ const Menu = ({children, hasLeftSymbols, hasRightSymbols}) => {

Clay provides other ways to use the Clay component, which we call high-level components, which are designed to do a specific high-level behavior different from compositing that allow different possibilities, are less flexible.

### Icon

By default, a caret icon (▼) is displayed alongside the button text to indicate the dropdown functionality. This visually indicates a dropdown menu and improve user understanding.

The caret icon can be removed by passing `null` to the `triggerIcon` prop.

### With Items

Allows you to create a simple DropDown, through its API you are able to create a Menu with groups of checkboxes and radios, links, buttons, search, caption, etc.

<DropDownWithItems />

#### Customizable Trigger Icon

When using `DropDownWithItems`, you can customize the icon on the dropdown button via the `triggerIcon` prop.

#### Cascading Menu

`DropDownWithItems` allows the possibility to create a contextual menu, the nature of the API allows the creation of more cascade menus but the **Lexicon specification recommends using only one level** and using `DropDownWithDrilldown` component.
Expand Down
8 changes: 2 additions & 6 deletions packages/clay-management-toolbar/docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,6 @@ const ManagementToolbarCode = `const Component = () => {
<span className="navbar-text-truncate">
{'Filter and Order'}
</span>

<ClayIcon
className="inline-item inline-item-after"
spritemap={spritemap}
symbol="caret-bottom"
/>
</span>
<span className="navbar-breakpoint-d-none">
<ClayIcon
Expand All @@ -236,6 +230,7 @@ const ManagementToolbarCode = `const Component = () => {
</span>
</ClayButton>
}
triggerIcon="caret-bottom"
/>

<ClayManagementToolbar.Item>
Expand Down Expand Up @@ -332,6 +327,7 @@ const ManagementToolbarCode = `const Component = () => {
/>
</ClayButton>
}
triggerIcon="caret-double-l"
/>
</ClayManagementToolbar.Item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,13 @@ export const Default = () => {
<span className="navbar-text-truncate">
Filter and Order
</span>

<ClayIcon
className="inline-item inline-item-after"
symbol="caret-bottom"
/>
</span>
<span className="navbar-breakpoint-d-none">
<ClayIcon symbol="filter" />
</span>
</ClayButton>
}
triggerIcon="caret-bottom"
/>
</ClayManagementToolbar.Item>

Expand Down Expand Up @@ -168,6 +164,7 @@ export const Default = () => {
/>
</ClayButton>
}
triggerIcon="caret-double-l"
/>

<ClayManagementToolbar.Item>
Expand Down
Loading