Skip to content

Commit

Permalink
Fix(web-react): Add missing exports for Tooltip components
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Nov 3, 2023
1 parent cf79f1c commit aae6a89
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/web-react/src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useMemo, forwardRef, LegacyRef } from 'react';
import classNames from 'classnames';
import React, { LegacyRef, forwardRef, useMemo } from 'react';
import { useStyleProps } from '../../hooks';
import { SpiritTooltipProps } from '../../types';
import TooltipCloseButton from './TooltipCloseButton';
import { useTooltipStyleProps } from './useTooltipStyleProps';

const Tooltip = forwardRef((props: SpiritTooltipProps, ref) => {
export const Tooltip = forwardRef((props: SpiritTooltipProps, ref) => {
const { children, isDismissible, closeLabel = 'Close', open, onClose, ...restProps } = props;

const { classProps, props: modifiedProps } = useTooltipStyleProps({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Icon } from '../Icon';
import { VisuallyHidden } from '../VisuallyHidden';
import { useTooltipStyleProps } from './useTooltipStyleProps';

const TooltipCloseButton = ({ label = 'Close', onClick, ...restProps }: TooltipCloseButtonProps) => {
export const TooltipCloseButton = ({ label = 'Close', onClick, ...restProps }: TooltipCloseButtonProps) => {
const { classProps, props: modifiedProps } = useTooltipStyleProps({ ...restProps });
const { styleProps } = useStyleProps({ ...modifiedProps });

Expand Down
4 changes: 2 additions & 2 deletions packages/web-react/src/components/Tooltip/TooltipWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import classNames from 'classnames';
import React from 'react';
import { useStyleProps } from '../../hooks';
import { TooltipWrapperProps } from '../../types';
import { useTooltipStyleProps } from './useTooltipStyleProps';

const TooltipWrapper = ({ children, ...restProps }: TooltipWrapperProps) => {
export const TooltipWrapper = ({ children, ...restProps }: TooltipWrapperProps) => {
const { classProps, props: modifiedProps } = useTooltipStyleProps({ ...restProps });
const { styleProps } = useStyleProps({ ...modifiedProps });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UncontrolledTooltipProps } from '../../types';
import Tooltip from './Tooltip';
import { useTooltip } from './useTooltip';

const UncontrolledTooltip = (props: UncontrolledTooltipProps) => {
export const UncontrolledTooltip = (props: UncontrolledTooltipProps) => {
const { children, isDismissible, ...restProps } = props;

const { open, onClose } = useTooltip({ isDismissible });
Expand Down
9 changes: 5 additions & 4 deletions packages/web-react/src/components/Tooltip/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
export * from './Tooltip';
export * from './TooltipWrapper';
export { default as Tooltip } from './Tooltip';
export * from './TooltipCloseButton';
export { default as TooltipCloseButton } from './TooltipCloseButton';
export * from './TooltipWrapper';
export { default as TooltipWrapper } from './TooltipWrapper';
export * from './UncontrolledTooltip';
export { default as UncontrolledTooltip } from './UncontrolledTooltip';
export * from './useTooltip';
export * from './useTooltipStyleProps';
export { default as Tooltip } from './Tooltip';
export { default as TooltipWrapper } from './TooltipWrapper';
export { default as UncontrolledTooltip } from './UncontrolledTooltip';

0 comments on commit aae6a89

Please sign in to comment.