Skip to content

Commit

Permalink
Export prop types from index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
colebemis committed Mar 31, 2021
1 parent d573dd1 commit 21c806c
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Flash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from 'styled-components'
import {variant} from 'styled-system'
import {COMMON, get, SystemCommonProps} from './constants'
import sx, {SxProp} from './sx'
import {ComponentProps} from './utils/types'

const variants = variant({
variants: {
Expand Down Expand Up @@ -72,4 +73,5 @@ Flash.defaultProps = {
variant: 'default'
}

export type FlashProps = ComponentProps<typeof Flash>
export default Flash
1 change: 1 addition & 0 deletions src/Pagination/index.tsx → src/Pagination/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Pagination from './Pagination'

export type {PaginationProps} from './Pagination'
export default Pagination
2 changes: 1 addition & 1 deletion src/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ SideNavLink.defaultProps = {
SideNavLink.displayName = 'SideNav.Link'

export type SideNavProps = ComponentProps<typeof SideNav>
export type SideNavLinksProps = ComponentProps<typeof SideNavLink>
export type SideNavLinkProps = ComponentProps<typeof SideNavLink>

export default Object.assign(SideNav, {Link: SideNavLink})
84 changes: 83 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
export {default as theme} from './theme'
export {get as themeGet} from './constants'
export {default as BaseStyles} from './BaseStyles'
export type {BaseStylesProps} from './BaseStyles'
export {default as ThemeProvider, useTheme, useColorSchemeVar} from './ThemeProvider'
export type {ThemeProviderProps} from './ThemeProvider'

// Layout
export {default as BorderBox} from './BorderBox'
export type {BorderBoxProps} from './BorderBox'
export {default as Box} from './Box'
export type {BoxProps} from './Box'
export {default as Flex} from './Flex'
export type {FlexProps} from './Flex'
export {default as Grid} from './Grid'
export type {GridProps} from './Grid'
export {default as Position, Absolute, Fixed, Relative, Sticky} from './Position'
export type {PositionProps, AbsoluteProps, FixedProps, RelativeProps, StickyProps} from './Position'

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

// Components
export {default as Avatar} from './Avatar'
export type {AvatarProps} from './Avatar'
export {default as AvatarPair} from './AvatarPair'
export type {AvatarPairProps} from './AvatarPair'
export {default as AvatarStack} from './AvatarStack'
export type {AvatarStackProps} from './AvatarStack'
export {default as BranchName} from './BranchName'
export type {BranchNameProps} from './BranchName'
export {default as Breadcrumb} from './Breadcrumb'
export type {BreadcrumbProps, BreadcrumbItemProps} from './Breadcrumb'
export {
default as Button,
ButtonDanger,
Expand All @@ -35,38 +47,108 @@ export {
ButtonClose,
ButtonGroup
} from './Button'
export type {
ButtonProps,
ButtonDangerProps,
ButtonOutlineProps,
ButtonPrimaryProps,
ButtonInvisibleProps,
ButtonTableListProps,
ButtonCloseProps,
ButtonGroupProps
} from './Button'
export {default as Caret} from './Caret'
export type {CaretProps} from './Caret'
export {default as CircleBadge} from './CircleBadge'
export type {CircleBadgeProps, CircleBadgeIconProps} from './CircleBadge'
export {default as CircleOcticon} from './CircleOcticon'
export type {CircleOcticonProps} from './CircleOcticon'
export {default as CounterLabel} from './CounterLabel'
export type {CounterLabelProps} from './CounterLabel'
export {default as Details} from './Details'
export type {DetailsProps} from './Details'
export {default as Dialog} from './Dialog'
export type {DialogProps, DialogHeaderProps} from './Dialog'
export {default as Dropdown} from './Dropdown'
export type {
DropdownProps,
DropdownCaretProps,
DropdownButtonProps,
DropdownItemProps,
DropdownMenuProps
} from './Dropdown'
export {default as FilteredSearch} from './FilteredSearch'
export type {FilteredSearchProps} from './FilteredSearch'
export {default as FilterList} from './FilterList'
export type {FilterListProps, FilterListItemProps} from './FilterList'
export {default as Flash} from './Flash'
export type {FlashProps} from './Flash'
export {default as FormGroup} from './FormGroup'
export type {FormGroupProps, FormGroupLabelProps} from './FormGroup'
export {default as Header} from './Header'
export type {HeaderProps, HeaderItemProps, HeaderLinkProps} from './Header'
export {default as Heading} from './Heading'
export type {HeadingProps} from './Heading'
export {default as LabelGroup} from './LabelGroup'
export type {LabelGroupProps} from './LabelGroup'
export {default as Label} from './Label'
export type {LabelProps} from './Label'
export {default as Link} from './Link'
export type {LinkProps} from './Link'
export {default as Overlay} from './Overlay'
export type {OverlayProps} from './Overlay'
export {default as Pagehead} from './Pagehead'
export type {PageheadProps} from './Pagehead'
export {default as Pagination} from './Pagination'
export type {PaginationProps} from './Pagination'
export {default as PointerBox} from './PointerBox'
export type {PointerBoxProps} from './PointerBox'
export {default as Popover} from './Popover'
// export {default as Portal, PortalProps, registerPortalRoot} from './Portal'
export type {PopoverProps, PopoverContentProps} from './Popover'
// export {default as Portal, registerPortalRoot} from './Portal'
// export type {PortalProps} from './Portal'
export {default as ProgressBar} from './ProgressBar'
export type {ProgressBarProps} from './ProgressBar'
export {default as SelectMenu} from './SelectMenu'
export type {
SelectMenuProps,
SelectMenuDividerProps,
SelectMenuFilterProps,
SelectMenuFooterProps,
SelectMenuItemProps,
SelectMenuListProps,
SelectMenuModalProps,
SelectMenuTabsProps,
SelectMenuHeaderProps,
SelectMenuTabProps,
SelectMenuTabPanelProps,
SelectMenuLoadingAnimationProps
} from './SelectMenu'
export {default as SideNav} from './SideNav'
export type {SideNavProps, SideNavLinkProps} from './SideNav'
export {default as StateLabel} from './StateLabel'
export type {StateLabelProps} from './StateLabel'
export {default as StyledOcticon} from './StyledOcticon'
export type {StyledOcticonProps} from './StyledOcticon'
export {default as SubNav} from './SubNav'
export type {SubNavProps, SubNavLinkProps, SubNavLinksProps} from './SubNav'
export {default as TabNav} from './TabNav'
export type {TabNavProps, TabNavLinkProps} from './TabNav'
export {default as TextInput} from './TextInput'
export type {TextInputProps} from './TextInput'
export {default as Text} from './Text'
export type {TextProps} from './Text'
export {default as Timeline} from './Timeline'
export type {
TimelineProps,
TimelineBadgeProps,
TimelineBodyProps,
TimelineBreakProps,
TimelineItemsProps
} from './Timeline'
export {default as Tooltip} from './Tooltip'
export type {TooltipProps} from './Tooltip'
export {default as Truncate} from './Truncate'
export type {TruncateProps} from './Truncate'
export {default as UnderlineNav} from './UnderlineNav'
export type {UnderlineNavProps, UnderlineNavLinkProps} from './UnderlineNav'

0 comments on commit 21c806c

Please sign in to comment.