Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(customPropTypes|typings): allow to pass a function to itemShorthand, update typings #3183

Merged
merged 2 commits into from
Sep 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export {
} from './dist/commonjs/elements/Step/StepTitle'

// Generics
export * from './dist/commonjs'
export * from './src/generic'

// Modules
export {
Expand Down
2 changes: 1 addition & 1 deletion src/addons/Confirm/Confirm.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandItem } from '../..'
import { SemanticShorthandItem } from '../../generic'
import { ButtonProps } from '../../elements/Button'
import { StrictModalProps } from '../../modules/Modal'
import { ModalContentProps } from '../../modules/Modal/ModalContent'
Expand Down
2 changes: 1 addition & 1 deletion src/addons/Pagination/Pagination.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandItem } from '../..'
import { SemanticShorthandItem } from '../../generic'
import { default as PaginationItem, PaginationItemProps } from './PaginationItem'

export interface PaginationProps extends StrictPaginationProps {
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Breadcrumb/Breadcrumb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
SemanticShorthandCollection,
SemanticShorthandContent,
SemanticShorthandItem,
} from '../..'
} from '../../generic'
import { IconProps } from '../../elements/Icon'
import BreadcrumbDivider from './BreadcrumbDivider'
import { default as BreadcrumbSection, BreadcrumbSectionProps } from './BreadcrumbSection'
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Breadcrumb/BreadcrumbDivider.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandContent, SemanticShorthandItem } from '../..'
import { SemanticShorthandContent, SemanticShorthandItem } from '../../generic'
import { IconProps } from '../../elements/Icon'

export interface BreadcrumbDividerProps extends StrictBreadcrumbDividerProps {
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Breadcrumb/BreadcrumbSection.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface BreadcrumbSectionProps extends StrictBreadcrumbSectionProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Form/FormButton.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandItem } from '../..'
import { SemanticShorthandItem } from '../../generic'
import { StrictButtonProps } from '../../elements/Button'
import { LabelProps } from '../../elements/Label'
import { StrictFormFieldProps } from './FormField'
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Form/FormField.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
SemanticShorthandContent,
SemanticShorthandItem,
SemanticWIDTHS,
} from '../..'
} from '../../generic'

export interface FormFieldProps extends StrictFormFieldProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Form/FormGroup.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticWIDTHS } from '../..'
import { SemanticWIDTHS } from '../../generic'

export interface FormGroupProps extends StrictFormGroupProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Form/FormInput.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandItem } from '../..'
import { SemanticShorthandItem } from '../../generic'
import { LabelProps } from '../../elements/Label'
import { StrictInputProps } from '../../elements/Input'
import { StrictFormFieldProps } from './FormField'
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Grid/Grid.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticTEXTALIGNMENTS, SemanticVERTICALALIGNMENTS, SemanticWIDTHS } from '../..'
import { SemanticTEXTALIGNMENTS, SemanticVERTICALALIGNMENTS, SemanticWIDTHS } from '../../generic'
import GridColumn from './GridColumn'
import GridRow from './GridRow'

Expand Down
2 changes: 1 addition & 1 deletion src/collections/Grid/GridColumn.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SemanticTEXTALIGNMENTS,
SemanticVERTICALALIGNMENTS,
SemanticWIDTHS,
} from '../..'
} from '../../generic'

export type GridOnlyProp =
| string
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Grid/GridRow.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SemanticTEXTALIGNMENTS,
SemanticVERTICALALIGNMENTS,
SemanticWIDTHS,
} from '../..'
} from '../../generic'
import { GridReversedProp } from './Grid'
import { GridOnlyProp } from './GridColumn'

Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/Menu.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticCOLORS, SemanticShorthandCollection, SemanticWIDTHS } from '../..'
import { SemanticCOLORS, SemanticShorthandCollection, SemanticWIDTHS } from '../../generic'
import MenuHeader from './MenuHeader'
import { default as MenuItem, MenuItemProps } from './MenuItem'
import MenuMenu from './MenuMenu'
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/MenuHeader.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface MenuHeaderProps extends StrictMenuHeaderProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/MenuItem.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticCOLORS, SemanticShorthandContent, SemanticShorthandItem } from '../..'
import { SemanticCOLORS, SemanticShorthandContent, SemanticShorthandItem } from '../../generic'
import { IconProps } from '../../elements/Icon'

export interface MenuItemProps extends StrictMenuItemProps {
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/MenuMenu.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface MenuMenuProps extends StrictMenuMenuProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/Message.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SemanticShorthandCollection,
SemanticShorthandContent,
SemanticShorthandItem,
} from '../..'
} from '../../generic'
import MessageContent from './MessageContent'
import { default as MessageHeader, MessageHeaderProps } from './MessageHeader'
import { default as MessageItem, MessageItemProps } from './MessageItem'
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageContent.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface MessageContentProps extends StrictMessageContentProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageHeader.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface MessageHeaderProps extends StrictMessageHeaderProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageItem.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface MessageItemProps extends StrictMessageItemProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageList.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandCollection } from '../..'
import { SemanticShorthandCollection } from '../../generic'
import { MessageItemProps } from './MessageItem'

export interface MessageListProps extends StrictMessageListProps {
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Table/Table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SemanticShorthandItem,
SemanticVERTICALALIGNMENTS,
SemanticWIDTHS,
} from '../..'
} from '../../generic'
import TableBody from './TableBody'
import TableCell from './TableCell'
import TableFooter from './TableFooter'
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Table/TableCell.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SemanticShorthandItem,
SemanticVERTICALALIGNMENTS,
SemanticWIDTHS,
} from '../..'
} from '../../generic'
import { IconProps } from '../../elements/Icon'

export interface TableCellProps extends StrictTableCellProps {
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Table/TableHeader.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface TableHeaderProps extends StrictTableHeaderProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Table/TableRow.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandCollection, SemanticVERTICALALIGNMENTS } from '../..'
import { SemanticShorthandCollection, SemanticVERTICALALIGNMENTS } from '../../generic'
import { TableCellProps } from './TableCell'

export interface TableRowProps extends StrictTableRowProps {
Expand Down
5 changes: 3 additions & 2 deletions src/elements/Button/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
SemanticShorthandContent,
SemanticShorthandItem,
SemanticSIZES,
} from '../..'
} from '../../generic'
import { IconProps } from '../Icon'
import { LabelProps } from '../Label'
import ButtonContent from './ButtonContent'
import ButtonGroup from './ButtonGroup'
Expand Down Expand Up @@ -68,7 +69,7 @@ export interface StrictButtonProps {
fluid?: boolean

/** Add an Icon by name, props object, or pass an <Icon />. */
icon?: any
icon?: boolean | SemanticShorthandItem<IconProps>

/** A button can be formatted to appear on dark backgrounds. */
inverted?: boolean
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Button/ButtonContent.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface ButtonContentProps extends StrictButtonContentProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Button/ButtonGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SemanticShorthandCollection,
SemanticSIZES,
SemanticWIDTHS,
} from '../..'
} from '../../generic'
import { ButtonProps } from './Button'

export interface ButtonGroupProps extends StrictButtonGroupProps {
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Container/Container.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent, SemanticTEXTALIGNMENTS } from '../..'
import { SemanticShorthandContent, SemanticTEXTALIGNMENTS } from '../../generic'

export interface ContainerProps extends StrictContainerProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Divider/Divider.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface DividerProps extends StrictDividerProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Header/Header.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticCOLORS, SemanticFLOATS, SemanticTEXTALIGNMENTS } from '../..'
import { SemanticCOLORS, SemanticFLOATS, SemanticTEXTALIGNMENTS } from '../../generic'
import HeaderContent from './HeaderContent'
import HeaderSubHeader from './HeaderSubheader'

Expand Down
2 changes: 1 addition & 1 deletion src/elements/Header/HeaderContent.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface HeaderContentProps extends StrictHeaderContentProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Header/HeaderSubheader.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface HeaderSubheaderProps extends StrictHeaderSubheaderProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Icon/Icon.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticCOLORS, SemanticICONS } from '../..'
import { SemanticCOLORS, SemanticICONS } from '../../generic'
import IconGroup from './IconGroup'

export type IconSizeProp = 'mini' | 'tiny' | 'small' | 'large' | 'big' | 'huge' | 'massive'
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Icon/IconGroup.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'
import { IconSizeProp } from './Icon'

export interface IconGroupProps extends StrictIconGroupProps {
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Image/Image.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SemanticSIZES,
SemanticVERTICALALIGNMENTS,
SemanticWIDTHS,
} from '../..'
} from '../../generic'
import { DimmerProps } from '../../modules/Dimmer'
import { LabelProps } from '../Label'
import ImageGroup from './ImageGroup'
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Image/ImageGroup.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticSIZES, SemanticShorthandContent } from '../..'
import { SemanticSIZES, SemanticShorthandContent } from '../../generic'

export interface ImageGroupProps extends StrictImageGroupProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Input/Input.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { HtmlInputrops, SemanticShorthandItem, SemanticSIZES } from '../..'
import { HtmlInputrops, SemanticShorthandItem, SemanticSIZES } from '../../generic'
import { LabelProps } from '../Label'

export interface InputProps extends StrictInputProps {
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Label/Label.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SemanticShorthandContent,
SemanticShorthandItem,
SemanticSIZES,
} from '../..'
} from '../../generic'
import { IconProps } from '../Icon'
import { default as LabelDetail, LabelDetailProps } from './LabelDetail'
import LabelGroup from './LabelGroup'
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Label/LabelDetail.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface LabelDetailProps extends StrictLabelDetailProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Label/LabelGroup.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticCOLORS, SemanticShorthandContent, SemanticSIZES } from '../..'
import { SemanticCOLORS, SemanticShorthandContent, SemanticSIZES } from '../../generic'

export interface LabelGroupProps extends StrictLabelGroupProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/List/List.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SemanticShorthandContent,
SemanticSIZES,
SemanticVERTICALALIGNMENTS,
} from '../..'
} from '../../generic'
import ListContent from './ListContent'
import ListDescription from './ListDescription'
import ListHeader from './ListHeader'
Expand Down
2 changes: 1 addition & 1 deletion src/elements/List/ListContent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SemanticShorthandContent,
SemanticShorthandItem,
SemanticVERTICALALIGNMENTS,
} from '../..'
} from '../../generic'
import { ListDescriptionProps } from './ListDescription'
import { ListHeaderProps } from './ListHeader'

Expand Down
2 changes: 1 addition & 1 deletion src/elements/List/ListDescription.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface ListDescriptionProps extends StrictListDescriptionProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/List/ListHeader.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface ListHeaderProps extends StrictListHeaderProps {
[key: string]: any
Expand Down
2 changes: 1 addition & 1 deletion src/elements/List/ListIcon.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticVERTICALALIGNMENTS } from '../..'
import { SemanticVERTICALALIGNMENTS } from '../../generic'
import { StrictIconProps } from '../Icon'

export interface ListIconProps extends StrictListIconProps {
Expand Down
2 changes: 1 addition & 1 deletion src/elements/List/ListItem.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { SemanticShorthandItem } from '../..'
import { SemanticShorthandItem } from '../../generic'
import { ImageProps } from '../Image'
import { ListContentProps } from './ListContent'
import { ListDescriptionProps } from './ListDescription'
Expand Down
2 changes: 1 addition & 1 deletion src/elements/List/ListList.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SemanticShorthandContent } from '../..'
import { SemanticShorthandContent } from '../../generic'

export interface ListListProps extends StrictListListProps {
[key: string]: any
Expand Down
Loading