Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/gamut/src/Tip/shared/FloatingTip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const FloatingTip: React.FC<TipWrapperProps> = ({
escapeKeyPressHandler,
inheritDims,
info,
isTipHidden,
// isTipHidden,
loading,
narrow,
overline,
Expand Down Expand Up @@ -130,7 +130,7 @@ export const FloatingTip: React.FC<TipWrapperProps> = ({
animation="fade"
dims={dims}
horizontalOffset={offset}
isOpen={isHoverType ? isOpen : !isTipHidden}
isOpen
outline
skipFocusTrap
targetRef={ref}
Expand Down
5 changes: 3 additions & 2 deletions packages/gamut/src/Tip/shared/styles/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ export const leftAlignStyles = {
export const verticalCenterStyles = {
...verticalCenterWidths,
left: 'calc(50% - 4rem)',
width: '70vw',
// ** This width helps the tooltip center itself to targets
// smaller than it, and makes sure its legible at small screensizes */
width: 'min(128px, 70vw)',
} as const;

export const verticalCenterStylesAfter = { left: 'calc(50% - 0.5rem)' };
Expand Down Expand Up @@ -199,7 +201,6 @@ export const toolTipAlignmentVariants = variant({
bg: 'transparent',
display: 'flex',
fontSmoothPixel,
maxWidth: '70vw',
opacity: 0,
position: 'absolute',
visibility: 'hidden',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ export const Floating: Story = {
</ToolTip>
<IconButton
icon={SmileyStarEyesIcon}
tip="Wonder at the majesty of the universe"
tip="Wonder"
tipProps={{ alignment: 'right-center', placement: 'floating' }}
/>{' '}
<IconButton
icon={SmileyStarEyesIcon}
tip="Wonder at the majesty of the universe"
tip="Wonder more"
tipProps={{ alignment: 'left-center', placement: 'floating' }}
/>
</FlexBox>
Expand Down
Loading