Skip to content

Commit

Permalink
Merge pull request #38 from perimetre/fix/allow-tooltip-to-get-more-p…
Browse files Browse the repository at this point in the history
…roperties

fix/allow tooltip to get more properties
  • Loading branch information
AssisrMatheus authored May 19, 2021
2 parents ebb8b54 + 10738d8 commit f7a39a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [3.0.2] - 2021-05-19

### Changes

- Moved props ordering on Dropdown so other properties can be overidden to allow for further customization

## [3.0.1] - 2021-04-30

## Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@perimetre/ui",
"description": "A component library made by @perimetre",
"version": "3.0.1",
"version": "3.0.2",
"repository": {
"type": "git",
"url": "git+https://github.com/perimetre/ui.git"
Expand Down
8 changes: 4 additions & 4 deletions src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type DropdownContentOrList =
| DropdownItem[]
| ((getLinkList: (items: DropdownItem[]) => React.ReactNode) => JSX.Element);

export type DropdownProps = Omit<TooltipProps, 'arrow' | 'content'> & {
export type DropdownProps = Omit<TooltipProps, 'content'> & {
/**
* A list of items or a function that returns a react component with what should be displayed in the dropdown's header
*/
Expand Down Expand Up @@ -57,9 +57,6 @@ export const Dropdown: React.FC<DropdownProps> = forwardRef<Element, DropdownPro
return (
<Tooltip
placement="bottom-start"
{...props}
ref={ref}
interactive
arrow={false}
trigger="click"
contentClassName="p-0"
Expand All @@ -80,6 +77,9 @@ export const Dropdown: React.FC<DropdownProps> = forwardRef<Element, DropdownPro
}
]
}}
{...props}
interactive
ref={ref}
content={
<>
{header && (
Expand Down

0 comments on commit f7a39a4

Please sign in to comment.