Skip to content

Commit

Permalink
fix: fix exports and types (#5969)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang committed Aug 12, 2021
1 parent a934c09 commit 3531dc8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/Popover.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import classNames from 'classnames';
import * as React from 'react';
import PropTypes from 'prop-types';
import { OverlayArrowProps } from '@restart/ui/Overlay';
import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
import PopoverHeader from './PopoverHeader';
import PopoverBody from './PopoverBody';
import { ArrowProps, Placement } from './types';
import { Placement } from './types';
import { BsPrefixProps, getOverlayDirection } from './helpers';

export interface PopoverProps
extends React.HTMLAttributes<HTMLDivElement>,
BsPrefixProps {
placement?: Placement;
title?: string;
arrowProps?: ArrowProps;
arrowProps?: Partial<OverlayArrowProps>;
body?: boolean;
popper?: any;
show?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/Tab.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import * as React from 'react';
import Tabs from '@restart/ui/Tabs';
import TabContainer from './TabContainer';
import TabContent from './TabContent';
import TabPane, { TabPaneProps } from './TabPane';

Expand Down Expand Up @@ -43,7 +43,7 @@ const Tab: React.FC<TabProps> = () => {
Tab.propTypes = propTypes;

export default Object.assign(Tab, {
Container: Tabs,
Container: TabContainer,
Content: TabContent,
Pane: TabPane,
});
5 changes: 3 additions & 2 deletions src/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import classNames from 'classnames';
import * as React from 'react';
import PropTypes from 'prop-types';
import { OverlayArrowProps } from '@restart/ui/Overlay';
import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
import { ArrowProps, Placement } from './types';
import { Placement } from './types';
import { BsPrefixProps, getOverlayDirection } from './helpers';

export interface TooltipProps
extends React.HTMLAttributes<HTMLDivElement>,
BsPrefixProps {
placement?: Placement;
arrowProps?: ArrowProps;
arrowProps?: Partial<OverlayArrowProps>;
show?: boolean;
popper?: any;
}
Expand Down
5 changes: 0 additions & 5 deletions src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ export type Color =

export type Placement = import('@restart/ui/usePopper').Placement;

export type ArrowProps = {
ref: React.RefCallback<HTMLElement>;
style: React.CSSProperties;
};

export type AlignDirection = 'start' | 'end';

export type ResponsiveAlignProp =
Expand Down
4 changes: 3 additions & 1 deletion tests/simple-types-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,9 @@ const MegaComponent = () => (
onToggle={noop}
focusFirstItemOnShow="keyboard"
navbar
/>
>
<Dropdown.Item />
</SplitButton>
<Table
id="id"
bordered
Expand Down

0 comments on commit 3531dc8

Please sign in to comment.