Skip to content

Commit

Permalink
changed example name and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ThusharaJ07 committed Jun 5, 2024
1 parent bf29ca8 commit cfd0dc1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/stories/combo-box/combo-box.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ export const FreeText: StoryFn<ComboBoxProps> = (args) => {
);
};

export const ClearAll: StoryFn<ComboBoxProps> = (args) => {
export const ClearSelection: StoryFn<ComboBoxProps> = (args) => {
const [value, setValue] = useState(getTemplateDefaultValue(args));
const [selected, setSelected] = useState<string[]>([]);

Expand Down
6 changes: 3 additions & 3 deletions site/docs/components/combo-box/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ Use the `truncate` prop when you are limited on space and want to prevent the mu

</LivePreview>

<LivePreview componentName="combo-box" exampleName="ClearAll" >
<LivePreview componentName="combo-box" exampleName="ClearSelection" >

## Clear All
## Clear Selection

In order to achieve the clear all functionality, you can pass a close icon in endAdornment prop.
In order to clear all the selections, you can pass a [`Button`](../button) to the `endAdornment` prop of the `ComboBox`.

</LivePreview>
</LivePreviewControls>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ComboBox, Button, Option } from "@salt-ds/core";
import { shortColorData } from "./exampleData";
import { CloseIcon } from "@salt-ds/icons";

export const ClearAll = (): ReactElement => {
export const ClearSelection = (): ReactElement => {
const [value, setValue] = useState("");
const [selected, setSelected] = useState<string[]>([]);

Expand Down
2 changes: 1 addition & 1 deletion site/src/examples/combo-box/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export * from "./CustomFiltering";
export * from "./ServerSideData";
export * from "./ObjectValues";
export * from "./Truncation";
export * from "./ClearAll";
export * from "./ClearSelection";

0 comments on commit cfd0dc1

Please sign in to comment.