Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
chore: resolved comments from pr
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawn Carrasco authored and Dawn Carrasco committed May 20, 2024
1 parent 4ff9bc3 commit f1cee9e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@govconnex/ui",
"version": "0.0.177",
"version": "0.0.178",
"description": "GovConnex UI - React Component Library",
"scripts": {
"build:tokens": "./tokens-build.sh",
Expand Down
1 change: 1 addition & 0 deletions src/components/Dropdown/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const WithSelectedOption = Template.bind({});
WithSelectedOption.args = {
...Default.args,
defaultValue: "1",
maxWidth: "40%",
};

export const MultipleSelect = Template.bind({});
Expand Down
14 changes: 12 additions & 2 deletions src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ import {ListItem} from "../List";
import Chip from "../Chip";
import {faChevronDown, faSearch} from "@fortawesome/pro-regular-svg-icons";

export interface Option {
id: string | number;
text: string;
selected?: boolean;
category?: string;
endAdornment?: React.ReactNode;
}

export interface DropdownProps {
label?: string;
placeholder?: string;
options?: any;
options?: Option[];
loading?: boolean;
defaultValue?: React.ReactNode;
maxWidth?: string;
Expand Down Expand Up @@ -113,11 +121,13 @@ const Dropdown = ({
>
{hasSelectedCount ? (
!notSelectedCount ? (
// needed to disable because eslint is looking for aria attribute role
// eslint-disable-next-line
<Chip priority="low" role="primary" size="md">
ALL
</Chip>
) : selectedCount ? (
// needed to disable because eslint is looking for aria attribute role
// eslint-disable-next-line
<Chip priority="low" role="primary" size="md">
{selectedCount}
Expand Down Expand Up @@ -162,7 +172,7 @@ const Dropdown = ({
padding: "0px",
zIndex: 9,
width: "calc(100% - 40px)",
maxWidth: maxWidth ? maxWidth : "40%",
maxWidth: maxWidth ? maxWidth : "none",
}}
>
<MenuList style={{position: "relative"}}>
Expand Down

0 comments on commit f1cee9e

Please sign in to comment.