Skip to content

Commit 21c806c

Browse files
committed
Export prop types from index.ts
1 parent d573dd1 commit 21c806c

File tree

4 files changed

+87
-2
lines changed

4 files changed

+87
-2
lines changed

src/Flash.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import styled from 'styled-components'
22
import {variant} from 'styled-system'
33
import {COMMON, get, SystemCommonProps} from './constants'
44
import sx, {SxProp} from './sx'
5+
import {ComponentProps} from './utils/types'
56

67
const variants = variant({
78
variants: {
@@ -72,4 +73,5 @@ Flash.defaultProps = {
7273
variant: 'default'
7374
}
7475

76+
export type FlashProps = ComponentProps<typeof Flash>
7577
export default Flash
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import Pagination from './Pagination'
22

3+
export type {PaginationProps} from './Pagination'
34
export default Pagination

src/SideNav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,6 @@ SideNavLink.defaultProps = {
160160
SideNavLink.displayName = 'SideNav.Link'
161161

162162
export type SideNavProps = ComponentProps<typeof SideNav>
163-
export type SideNavLinksProps = ComponentProps<typeof SideNavLink>
163+
export type SideNavLinkProps = ComponentProps<typeof SideNavLink>
164164

165165
export default Object.assign(SideNav, {Link: SideNavLink})

src/index.ts

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
export {default as theme} from './theme'
22
export {get as themeGet} from './constants'
33
export {default as BaseStyles} from './BaseStyles'
4+
export type {BaseStylesProps} from './BaseStyles'
45
export {default as ThemeProvider, useTheme, useColorSchemeVar} from './ThemeProvider'
6+
export type {ThemeProviderProps} from './ThemeProvider'
57

68
// Layout
79
export {default as BorderBox} from './BorderBox'
10+
export type {BorderBoxProps} from './BorderBox'
811
export {default as Box} from './Box'
12+
export type {BoxProps} from './Box'
913
export {default as Flex} from './Flex'
14+
export type {FlexProps} from './Flex'
1015
export {default as Grid} from './Grid'
16+
export type {GridProps} from './Grid'
1117
export {default as Position, Absolute, Fixed, Relative, Sticky} from './Position'
18+
export type {PositionProps, AbsoluteProps, FixedProps, RelativeProps, StickyProps} from './Position'
1219

1320
// Hooks
1421
export {default as useDetails} from './hooks/useDetails'
@@ -21,10 +28,15 @@ export {useOverlay} from './hooks/useOverlay'
2128

2229
// Components
2330
export {default as Avatar} from './Avatar'
31+
export type {AvatarProps} from './Avatar'
2432
export {default as AvatarPair} from './AvatarPair'
33+
export type {AvatarPairProps} from './AvatarPair'
2534
export {default as AvatarStack} from './AvatarStack'
35+
export type {AvatarStackProps} from './AvatarStack'
2636
export {default as BranchName} from './BranchName'
37+
export type {BranchNameProps} from './BranchName'
2738
export {default as Breadcrumb} from './Breadcrumb'
39+
export type {BreadcrumbProps, BreadcrumbItemProps} from './Breadcrumb'
2840
export {
2941
default as Button,
3042
ButtonDanger,
@@ -35,38 +47,108 @@ export {
3547
ButtonClose,
3648
ButtonGroup
3749
} from './Button'
50+
export type {
51+
ButtonProps,
52+
ButtonDangerProps,
53+
ButtonOutlineProps,
54+
ButtonPrimaryProps,
55+
ButtonInvisibleProps,
56+
ButtonTableListProps,
57+
ButtonCloseProps,
58+
ButtonGroupProps
59+
} from './Button'
3860
export {default as Caret} from './Caret'
61+
export type {CaretProps} from './Caret'
3962
export {default as CircleBadge} from './CircleBadge'
63+
export type {CircleBadgeProps, CircleBadgeIconProps} from './CircleBadge'
4064
export {default as CircleOcticon} from './CircleOcticon'
65+
export type {CircleOcticonProps} from './CircleOcticon'
4166
export {default as CounterLabel} from './CounterLabel'
67+
export type {CounterLabelProps} from './CounterLabel'
4268
export {default as Details} from './Details'
69+
export type {DetailsProps} from './Details'
4370
export {default as Dialog} from './Dialog'
71+
export type {DialogProps, DialogHeaderProps} from './Dialog'
4472
export {default as Dropdown} from './Dropdown'
73+
export type {
74+
DropdownProps,
75+
DropdownCaretProps,
76+
DropdownButtonProps,
77+
DropdownItemProps,
78+
DropdownMenuProps
79+
} from './Dropdown'
4580
export {default as FilteredSearch} from './FilteredSearch'
81+
export type {FilteredSearchProps} from './FilteredSearch'
4682
export {default as FilterList} from './FilterList'
83+
export type {FilterListProps, FilterListItemProps} from './FilterList'
4784
export {default as Flash} from './Flash'
85+
export type {FlashProps} from './Flash'
4886
export {default as FormGroup} from './FormGroup'
87+
export type {FormGroupProps, FormGroupLabelProps} from './FormGroup'
4988
export {default as Header} from './Header'
89+
export type {HeaderProps, HeaderItemProps, HeaderLinkProps} from './Header'
5090
export {default as Heading} from './Heading'
91+
export type {HeadingProps} from './Heading'
5192
export {default as LabelGroup} from './LabelGroup'
93+
export type {LabelGroupProps} from './LabelGroup'
5294
export {default as Label} from './Label'
95+
export type {LabelProps} from './Label'
5396
export {default as Link} from './Link'
97+
export type {LinkProps} from './Link'
5498
export {default as Overlay} from './Overlay'
99+
export type {OverlayProps} from './Overlay'
55100
export {default as Pagehead} from './Pagehead'
101+
export type {PageheadProps} from './Pagehead'
56102
export {default as Pagination} from './Pagination'
103+
export type {PaginationProps} from './Pagination'
57104
export {default as PointerBox} from './PointerBox'
105+
export type {PointerBoxProps} from './PointerBox'
58106
export {default as Popover} from './Popover'
59-
// export {default as Portal, PortalProps, registerPortalRoot} from './Portal'
107+
export type {PopoverProps, PopoverContentProps} from './Popover'
108+
// export {default as Portal, registerPortalRoot} from './Portal'
109+
// export type {PortalProps} from './Portal'
60110
export {default as ProgressBar} from './ProgressBar'
111+
export type {ProgressBarProps} from './ProgressBar'
61112
export {default as SelectMenu} from './SelectMenu'
113+
export type {
114+
SelectMenuProps,
115+
SelectMenuDividerProps,
116+
SelectMenuFilterProps,
117+
SelectMenuFooterProps,
118+
SelectMenuItemProps,
119+
SelectMenuListProps,
120+
SelectMenuModalProps,
121+
SelectMenuTabsProps,
122+
SelectMenuHeaderProps,
123+
SelectMenuTabProps,
124+
SelectMenuTabPanelProps,
125+
SelectMenuLoadingAnimationProps
126+
} from './SelectMenu'
62127
export {default as SideNav} from './SideNav'
128+
export type {SideNavProps, SideNavLinkProps} from './SideNav'
63129
export {default as StateLabel} from './StateLabel'
130+
export type {StateLabelProps} from './StateLabel'
64131
export {default as StyledOcticon} from './StyledOcticon'
132+
export type {StyledOcticonProps} from './StyledOcticon'
65133
export {default as SubNav} from './SubNav'
134+
export type {SubNavProps, SubNavLinkProps, SubNavLinksProps} from './SubNav'
66135
export {default as TabNav} from './TabNav'
136+
export type {TabNavProps, TabNavLinkProps} from './TabNav'
67137
export {default as TextInput} from './TextInput'
138+
export type {TextInputProps} from './TextInput'
68139
export {default as Text} from './Text'
140+
export type {TextProps} from './Text'
69141
export {default as Timeline} from './Timeline'
142+
export type {
143+
TimelineProps,
144+
TimelineBadgeProps,
145+
TimelineBodyProps,
146+
TimelineBreakProps,
147+
TimelineItemsProps
148+
} from './Timeline'
70149
export {default as Tooltip} from './Tooltip'
150+
export type {TooltipProps} from './Tooltip'
71151
export {default as Truncate} from './Truncate'
152+
export type {TruncateProps} from './Truncate'
72153
export {default as UnderlineNav} from './UnderlineNav'
154+
export type {UnderlineNavProps, UnderlineNavLinkProps} from './UnderlineNav'

0 commit comments

Comments
 (0)