Skip to content

Commit

Permalink
Merge pull request #129 from MacPaw/fix/fixed-incorrect-custom-size-f…
Browse files Browse the repository at this point in the history
…or-tooltip

fix: incorrect custom size for tooltip
  • Loading branch information
algolj authored Jun 12, 2023
2 parents 85d7acf + 3f5dfa4 commit 4788d25
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@macpaw/macpaw-ui",
"version": "4.12.0",
"version": "4.13.0",
"main": "lib/ui.js",
"scripts": {
"dev": "next -p 1234",
Expand Down
2 changes: 1 addition & 1 deletion src/Tooltip/Tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
transition: all 0.1s linear;

&.-custom-width {
min-width: max-content;
min-width: min-content;
max-width: auto;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Tooltip: React.FC<React.PropsWithChildren<Tooltip>> = ({
forceHide,
openOnClick = false,
}) => {
const messageStyles = maxWidth ? ({ width: maxWidth } as React.CSSProperties) : {};
const messageStyles = maxWidth ? ({ width: maxWidth, maxWidth } as React.CSSProperties) : {};

const arrowRef = useRef(null);
const [isOpen, setIsOpen] = useState(false);
Expand Down

0 comments on commit 4788d25

Please sign in to comment.