Skip to content

Commit

Permalink
Merge pull request #79 from agility/divider-dropdown
Browse files Browse the repository at this point in the history
add divider classname
  • Loading branch information
5PK authored Aug 15, 2024
2 parents e9cd410 + 7e3d3e6 commit 05baf77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agility/plenum-ui",
"version": "2.1.8",
"version": "2.1.9",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
9 changes: 6 additions & 3 deletions stories/organisms/DropdownComponent/DropdownComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export interface IDropdownProps extends HTMLAttributes<HTMLDivElement> {
buttonClassname?: ClassNameWithAutocomplete
iconClassname?: ClassNameWithAutocomplete
iconSpacingClassname?: ClassNameWithAutocomplete
dividerClassname?: ClassNameWithAutocomplete
placement?: Placement
offsetOptions?: Partial<{
mainAxis: number
Expand All @@ -67,7 +68,8 @@ export const defaultClassNames = {
buttonClassname:
"py-[2px] flex items-center rounded outline-purple-500 transition-all text-gray-400 hover:text-gray-600 ",
iconClassname: "ml-1 h-5 w-6",
iconSpacingClassname: "flex items-center gap-x-4"
iconSpacingClassname: "flex items-center gap-x-4",
dividerClassname: "border-b border-b-gray-100"
}

/** Comment */
Expand All @@ -82,6 +84,7 @@ const Dropdown: React.FC<IDropdownProps> = ({
buttonClassname,
iconClassname,
iconSpacingClassname,
dividerClassname,
CustomDropdownTrigger,
placement = "bottom-start",
offsetOptions,
Expand Down Expand Up @@ -195,8 +198,8 @@ const Dropdown: React.FC<IDropdownProps> = ({
//Add dividing line between stacks
stackIndex !== items.length - 1 &&
itemIndex === itemStack.length - 1 &&
"border-b border-b-gray-100",
"w-full"
`${dividerClassname ? dividerClassname : defaultClassNames.dividerClassname}`,
"w-full"
),
...rest,
...getItemProps(),
Expand Down

0 comments on commit 05baf77

Please sign in to comment.