Skip to content

Commit 3531dc8

Browse files
authored
fix: fix exports and types (react-bootstrap#5969)
1 parent a934c09 commit 3531dc8

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

src/Popover.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import classNames from 'classnames';
22
import * as React from 'react';
33
import PropTypes from 'prop-types';
4+
import { OverlayArrowProps } from '@restart/ui/Overlay';
45
import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
56
import PopoverHeader from './PopoverHeader';
67
import PopoverBody from './PopoverBody';
7-
import { ArrowProps, Placement } from './types';
8+
import { Placement } from './types';
89
import { BsPrefixProps, getOverlayDirection } from './helpers';
910

1011
export interface PopoverProps
1112
extends React.HTMLAttributes<HTMLDivElement>,
1213
BsPrefixProps {
1314
placement?: Placement;
1415
title?: string;
15-
arrowProps?: ArrowProps;
16+
arrowProps?: Partial<OverlayArrowProps>;
1617
body?: boolean;
1718
popper?: any;
1819
show?: boolean;

src/Tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from 'prop-types';
22
import * as React from 'react';
3-
import Tabs from '@restart/ui/Tabs';
3+
import TabContainer from './TabContainer';
44
import TabContent from './TabContent';
55
import TabPane, { TabPaneProps } from './TabPane';
66

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

4545
export default Object.assign(Tab, {
46-
Container: Tabs,
46+
Container: TabContainer,
4747
Content: TabContent,
4848
Pane: TabPane,
4949
});

src/Tooltip.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import classNames from 'classnames';
22
import * as React from 'react';
33
import PropTypes from 'prop-types';
4+
import { OverlayArrowProps } from '@restart/ui/Overlay';
45
import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
5-
import { ArrowProps, Placement } from './types';
6+
import { Placement } from './types';
67
import { BsPrefixProps, getOverlayDirection } from './helpers';
78

89
export interface TooltipProps
910
extends React.HTMLAttributes<HTMLDivElement>,
1011
BsPrefixProps {
1112
placement?: Placement;
12-
arrowProps?: ArrowProps;
13+
arrowProps?: Partial<OverlayArrowProps>;
1314
show?: boolean;
1415
popper?: any;
1516
}

src/types.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ export type Color =
3535

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

38-
export type ArrowProps = {
39-
ref: React.RefCallback<HTMLElement>;
40-
style: React.CSSProperties;
41-
};
42-
4338
export type AlignDirection = 'start' | 'end';
4439

4540
export type ResponsiveAlignProp =

tests/simple-types-test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,9 @@ const MegaComponent = () => (
924924
onToggle={noop}
925925
focusFirstItemOnShow="keyboard"
926926
navbar
927-
/>
927+
>
928+
<Dropdown.Item />
929+
</SplitButton>
928930
<Table
929931
id="id"
930932
bordered

0 commit comments

Comments
 (0)