From 852336276a32bae42b1f1336bbbf0da3f9f5e1f3 Mon Sep 17 00:00:00 2001 From: Oleksandr Fediashov Date: Mon, 19 Aug 2019 16:52:04 +0200 Subject: [PATCH] chore(lib): remove `customPropTypes.as` --- .github/CONTRIBUTING.md | 2 +- src/addons/Responsive/Responsive.js | 10 ++-------- src/addons/TextArea/TextArea.js | 4 ++-- src/behaviors/Visibility/Visibility.js | 3 +-- src/collections/Breadcrumb/Breadcrumb.js | 2 +- src/collections/Breadcrumb/BreadcrumbDivider.js | 2 +- src/collections/Breadcrumb/BreadcrumbSection.js | 2 +- src/collections/Form/Form.js | 11 ++--------- src/collections/Form/FormButton.js | 5 +++-- src/collections/Form/FormCheckbox.js | 5 +++-- src/collections/Form/FormDropdown.js | 5 +++-- src/collections/Form/FormField.js | 2 +- src/collections/Form/FormGroup.js | 2 +- src/collections/Form/FormInput.js | 5 +++-- src/collections/Form/FormRadio.js | 5 +++-- src/collections/Form/FormSelect.js | 4 ++-- src/collections/Form/FormTextArea.js | 5 +++-- src/collections/Grid/Grid.js | 2 +- src/collections/Grid/GridColumn.js | 2 +- src/collections/Grid/GridRow.js | 2 +- src/collections/Menu/Menu.js | 2 +- src/collections/Menu/MenuHeader.js | 2 +- src/collections/Menu/MenuItem.js | 2 +- src/collections/Menu/MenuMenu.js | 2 +- src/collections/Message/Message.js | 2 +- src/collections/Message/MessageContent.js | 2 +- src/collections/Message/MessageHeader.js | 2 +- src/collections/Message/MessageItem.js | 2 +- src/collections/Message/MessageList.js | 2 +- src/collections/Table/Table.js | 2 +- src/collections/Table/TableBody.js | 4 ++-- src/collections/Table/TableCell.js | 2 +- src/collections/Table/TableFooter.js | 5 +++-- src/collections/Table/TableHeader.js | 2 +- src/collections/Table/TableHeaderCell.js | 4 ++-- src/collections/Table/TableRow.js | 4 ++-- src/elements/Button/Button.js | 2 +- src/elements/Button/ButtonContent.js | 2 +- src/elements/Button/ButtonGroup.js | 2 +- src/elements/Button/ButtonOr.js | 4 ++-- src/elements/Container/Container.js | 2 +- src/elements/Divider/Divider.js | 2 +- src/elements/Flag/Flag.js | 2 +- src/elements/Header/Header.js | 2 +- src/elements/Header/HeaderContent.js | 2 +- src/elements/Header/HeaderSubheader.js | 2 +- src/elements/Icon/Icon.js | 2 +- src/elements/Icon/IconGroup.js | 2 +- src/elements/Image/Image.js | 2 +- src/elements/Image/ImageGroup.js | 2 +- src/elements/Input/Input.js | 2 +- src/elements/Label/Label.js | 2 +- src/elements/Label/LabelDetail.js | 2 +- src/elements/Label/LabelGroup.js | 2 +- src/elements/List/List.js | 2 +- src/elements/List/ListContent.js | 2 +- src/elements/List/ListDescription.js | 2 +- src/elements/List/ListHeader.js | 2 +- src/elements/List/ListItem.js | 2 +- src/elements/List/ListList.js | 2 +- src/elements/Loader/Loader.js | 2 +- src/elements/Placeholder/Placeholder.js | 2 +- src/elements/Placeholder/PlaceholderHeader.js | 2 +- src/elements/Placeholder/PlaceholderImage.js | 2 +- src/elements/Placeholder/PlaceholderLine.js | 4 ++-- src/elements/Placeholder/PlaceholderParagraph.js | 2 +- src/elements/Rail/Rail.js | 2 +- src/elements/Reveal/Reveal.js | 2 +- src/elements/Reveal/RevealContent.js | 2 +- src/elements/Segment/Segment.js | 2 +- src/elements/Segment/SegmentGroup.js | 2 +- src/elements/Segment/SegmentInline.js | 2 +- src/elements/Step/Step.js | 2 +- src/elements/Step/StepContent.js | 2 +- src/elements/Step/StepDescription.js | 2 +- src/elements/Step/StepGroup.js | 2 +- src/elements/Step/StepTitle.js | 2 +- src/lib/customPropTypes.js | 8 -------- src/modules/Accordion/AccordionAccordion.js | 2 +- src/modules/Accordion/AccordionContent.js | 2 +- src/modules/Accordion/AccordionTitle.js | 2 +- src/modules/Checkbox/Checkbox.js | 2 +- src/modules/Dimmer/DimmerDimmable.js | 2 +- src/modules/Dimmer/DimmerInner.js | 2 +- src/modules/Dropdown/Dropdown.js | 2 +- src/modules/Dropdown/DropdownDivider.js | 4 ++-- src/modules/Dropdown/DropdownHeader.js | 2 +- src/modules/Dropdown/DropdownItem.js | 2 +- src/modules/Dropdown/DropdownMenu.js | 2 +- src/modules/Dropdown/DropdownSearchInput.js | 4 ++-- src/modules/Embed/Embed.js | 2 +- src/modules/Modal/Modal.js | 2 +- src/modules/Modal/ModalActions.js | 2 +- src/modules/Modal/ModalContent.js | 2 +- src/modules/Modal/ModalDescription.js | 2 +- src/modules/Modal/ModalHeader.js | 2 +- src/modules/Popup/Popup.js | 2 +- src/modules/Popup/PopupContent.js | 2 +- src/modules/Popup/PopupHeader.js | 2 +- src/modules/Progress/Progress.js | 2 +- src/modules/Rating/Rating.js | 3 +-- src/modules/Rating/RatingIcon.js | 4 ++-- src/modules/Search/Search.js | 2 +- src/modules/Search/SearchCategory.js | 2 +- src/modules/Search/SearchResult.js | 2 +- src/modules/Search/SearchResults.js | 2 +- src/modules/Sidebar/Sidebar.js | 2 +- src/modules/Sidebar/SidebarPushable.js | 2 +- src/modules/Sidebar/SidebarPusher.js | 2 +- src/modules/Sticky/Sticky.js | 2 +- src/modules/Tab/Tab.js | 2 +- src/modules/Tab/TabPane.js | 2 +- src/modules/Transition/TransitionGroup.js | 3 +-- src/views/Advertisement/Advertisement.js | 2 +- src/views/Card/Card.js | 2 +- src/views/Card/CardContent.js | 2 +- src/views/Card/CardDescription.js | 2 +- src/views/Card/CardGroup.js | 2 +- src/views/Card/CardHeader.js | 2 +- src/views/Card/CardMeta.js | 2 +- src/views/Comment/Comment.js | 2 +- src/views/Comment/CommentAction.js | 2 +- src/views/Comment/CommentActions.js | 2 +- src/views/Comment/CommentAuthor.js | 2 +- src/views/Comment/CommentAvatar.js | 3 +-- src/views/Comment/CommentContent.js | 2 +- src/views/Comment/CommentGroup.js | 2 +- src/views/Comment/CommentMetadata.js | 2 +- src/views/Comment/CommentText.js | 2 +- src/views/Feed/Feed.js | 2 +- src/views/Feed/FeedContent.js | 2 +- src/views/Feed/FeedDate.js | 2 +- src/views/Feed/FeedEvent.js | 2 +- src/views/Feed/FeedExtra.js | 2 +- src/views/Feed/FeedLabel.js | 2 +- src/views/Feed/FeedLike.js | 2 +- src/views/Feed/FeedMeta.js | 2 +- src/views/Feed/FeedSummary.js | 2 +- src/views/Feed/FeedUser.js | 2 +- src/views/Item/Item.js | 2 +- src/views/Item/ItemContent.js | 2 +- src/views/Item/ItemDescription.js | 2 +- src/views/Item/ItemExtra.js | 2 +- src/views/Item/ItemGroup.js | 2 +- src/views/Item/ItemHeader.js | 2 +- src/views/Item/ItemMeta.js | 2 +- src/views/Statistic/Statistic.js | 2 +- src/views/Statistic/StatisticGroup.js | 2 +- src/views/Statistic/StatisticLabel.js | 2 +- src/views/Statistic/StatisticValue.js | 2 +- 150 files changed, 175 insertions(+), 193 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 9bc2405b54..148685fcc0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -486,7 +486,7 @@ A docblock should appear above each prop in `propTypes` to describe them: ```js Label.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A label can reduce its complexity. */ basic: PropTypes.bool, diff --git a/src/addons/Responsive/Responsive.js b/src/addons/Responsive/Responsive.js index 596bcf699c..94db3f8048 100644 --- a/src/addons/Responsive/Responsive.js +++ b/src/addons/Responsive/Responsive.js @@ -2,13 +2,7 @@ import _ from 'lodash' import PropTypes from 'prop-types' import React, { Component } from 'react' -import { - customPropTypes, - eventStack, - getElementType, - getUnhandledProps, - isBrowser, -} from '../../lib' +import { eventStack, getElementType, getUnhandledProps, isBrowser } from '../../lib' import isVisible from './lib/isVisible' /** @@ -17,7 +11,7 @@ import isVisible from './lib/isVisible' export default class Responsive extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/addons/TextArea/TextArea.js b/src/addons/TextArea/TextArea.js index 5697bc0593..734448c8b1 100644 --- a/src/addons/TextArea/TextArea.js +++ b/src/addons/TextArea/TextArea.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import React, { Component, createRef } from 'react' import Ref from '../Ref' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' /** * A TextArea can be used to allow for extended user input. @@ -12,7 +12,7 @@ import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' class TextArea extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** * Called on change. diff --git a/src/behaviors/Visibility/Visibility.js b/src/behaviors/Visibility/Visibility.js index 1b0cf8f0ed..ef07675826 100644 --- a/src/behaviors/Visibility/Visibility.js +++ b/src/behaviors/Visibility/Visibility.js @@ -5,7 +5,6 @@ import React, { Component, createRef } from 'react' import Ref from '../../addons/Ref' import { eventStack, - customPropTypes, getElementType, getUnhandledProps, normalizeOffset, @@ -18,7 +17,7 @@ import { export default class Visibility extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Breadcrumb/Breadcrumb.js b/src/collections/Breadcrumb/Breadcrumb.js index b44a4b98a0..ee6b156f2b 100644 --- a/src/collections/Breadcrumb/Breadcrumb.js +++ b/src/collections/Breadcrumb/Breadcrumb.js @@ -48,7 +48,7 @@ function Breadcrumb(props) { Breadcrumb.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Breadcrumb/BreadcrumbDivider.js b/src/collections/Breadcrumb/BreadcrumbDivider.js index 386981528b..8c0ff3829f 100644 --- a/src/collections/Breadcrumb/BreadcrumbDivider.js +++ b/src/collections/Breadcrumb/BreadcrumbDivider.js @@ -46,7 +46,7 @@ function BreadcrumbDivider(props) { BreadcrumbDivider.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Breadcrumb/BreadcrumbSection.js b/src/collections/Breadcrumb/BreadcrumbSection.js index fe50420a11..32c6cdb0c5 100644 --- a/src/collections/Breadcrumb/BreadcrumbSection.js +++ b/src/collections/Breadcrumb/BreadcrumbSection.js @@ -18,7 +18,7 @@ import { export default class BreadcrumbSection extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Style as the currently active section. */ active: PropTypes.bool, diff --git a/src/collections/Form/Form.js b/src/collections/Form/Form.js index c3a0424c25..dbea936f3e 100644 --- a/src/collections/Form/Form.js +++ b/src/collections/Form/Form.js @@ -3,14 +3,7 @@ import _ from 'lodash' import PropTypes from 'prop-types' import React, { Component } from 'react' -import { - customPropTypes, - getElementType, - getUnhandledProps, - SUI, - useKeyOnly, - useWidthProp, -} from '../../lib' +import { getElementType, getUnhandledProps, SUI, useKeyOnly, useWidthProp } from '../../lib' import FormButton from './FormButton' import FormCheckbox from './FormCheckbox' import FormDropdown from './FormDropdown' @@ -35,7 +28,7 @@ import FormTextArea from './FormTextArea' class Form extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** The HTML form action */ action: PropTypes.string, diff --git a/src/collections/Form/FormButton.js b/src/collections/Form/FormButton.js index 51b1ec07c7..2ae1de7cf5 100644 --- a/src/collections/Form/FormButton.js +++ b/src/collections/Form/FormButton.js @@ -1,6 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' import Button from '../../elements/Button' import FormField from './FormField' @@ -19,7 +20,7 @@ function FormButton(props) { FormButton.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A FormField control prop. */ control: FormField.propTypes.control, diff --git a/src/collections/Form/FormCheckbox.js b/src/collections/Form/FormCheckbox.js index 4bd93b6d54..4f734c7aa9 100644 --- a/src/collections/Form/FormCheckbox.js +++ b/src/collections/Form/FormCheckbox.js @@ -1,6 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' import Checkbox from '../../modules/Checkbox' import FormField from './FormField' @@ -19,7 +20,7 @@ function FormCheckbox(props) { FormCheckbox.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A FormField control prop. */ control: FormField.propTypes.control, diff --git a/src/collections/Form/FormDropdown.js b/src/collections/Form/FormDropdown.js index 1d0ea7afc1..52e9648f31 100644 --- a/src/collections/Form/FormDropdown.js +++ b/src/collections/Form/FormDropdown.js @@ -1,6 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' import Dropdown from '../../modules/Dropdown' import FormField from './FormField' @@ -19,7 +20,7 @@ function FormDropdown(props) { FormDropdown.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A FormField control prop. */ control: FormField.propTypes.control, diff --git a/src/collections/Form/FormField.js b/src/collections/Form/FormField.js index f95fedb138..b5da5144f9 100644 --- a/src/collections/Form/FormField.js +++ b/src/collections/Form/FormField.js @@ -134,7 +134,7 @@ function FormField(props) { FormField.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Form/FormGroup.js b/src/collections/Form/FormGroup.js index 9ce86b5a25..06fcc15a21 100644 --- a/src/collections/Form/FormGroup.js +++ b/src/collections/Form/FormGroup.js @@ -38,7 +38,7 @@ function FormGroup(props) { FormGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Form/FormInput.js b/src/collections/Form/FormInput.js index b58297ca7c..472c02ce93 100644 --- a/src/collections/Form/FormInput.js +++ b/src/collections/Form/FormInput.js @@ -1,6 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' import Input from '../../elements/Input' import FormField from './FormField' @@ -19,7 +20,7 @@ function FormInput(props) { FormInput.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A FormField control prop. */ control: FormField.propTypes.control, diff --git a/src/collections/Form/FormRadio.js b/src/collections/Form/FormRadio.js index ab6f0e2459..5b77ecb404 100644 --- a/src/collections/Form/FormRadio.js +++ b/src/collections/Form/FormRadio.js @@ -1,6 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' import Radio from '../../addons/Radio' import FormField from './FormField' @@ -19,7 +20,7 @@ function FormRadio(props) { FormRadio.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A FormField control prop. */ control: FormField.propTypes.control, diff --git a/src/collections/Form/FormSelect.js b/src/collections/Form/FormSelect.js index e6e0a58fc2..d867140945 100644 --- a/src/collections/Form/FormSelect.js +++ b/src/collections/Form/FormSelect.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' import Select from '../../addons/Select' import Dropdown from '../../modules/Dropdown' import FormField from './FormField' @@ -21,7 +21,7 @@ function FormSelect(props) { FormSelect.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A FormField control prop. */ control: FormField.propTypes.control, diff --git a/src/collections/Form/FormTextArea.js b/src/collections/Form/FormTextArea.js index 100ade6ae3..6660b3344e 100644 --- a/src/collections/Form/FormTextArea.js +++ b/src/collections/Form/FormTextArea.js @@ -1,6 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' import TextArea from '../../addons/TextArea' import FormField from './FormField' @@ -19,7 +20,7 @@ function FormTextArea(props) { FormTextArea.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A FormField control prop. */ control: FormField.propTypes.control, diff --git a/src/collections/Grid/Grid.js b/src/collections/Grid/Grid.js index 09f3580cc7..bd85d6f197 100644 --- a/src/collections/Grid/Grid.js +++ b/src/collections/Grid/Grid.js @@ -74,7 +74,7 @@ Grid.Row = GridRow Grid.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A grid can have rows divided into cells. */ celled: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['internally'])]), diff --git a/src/collections/Grid/GridColumn.js b/src/collections/Grid/GridColumn.js index ea97d83ffe..993b554d78 100644 --- a/src/collections/Grid/GridColumn.js +++ b/src/collections/Grid/GridColumn.js @@ -65,7 +65,7 @@ function GridColumn(props) { GridColumn.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Grid/GridRow.js b/src/collections/Grid/GridRow.js index bbbd46aa3c..6917798fad 100644 --- a/src/collections/Grid/GridRow.js +++ b/src/collections/Grid/GridRow.js @@ -57,7 +57,7 @@ function GridRow(props) { GridRow.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A row can have its columns centered. */ centered: PropTypes.bool, diff --git a/src/collections/Menu/Menu.js b/src/collections/Menu/Menu.js index fabab9047f..5b9253b9b8 100644 --- a/src/collections/Menu/Menu.js +++ b/src/collections/Menu/Menu.js @@ -27,7 +27,7 @@ import MenuMenu from './MenuMenu' class Menu extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Index of the currently active item. */ activeIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/src/collections/Menu/MenuHeader.js b/src/collections/Menu/MenuHeader.js index 20cade9ff7..f007b5d1fc 100644 --- a/src/collections/Menu/MenuHeader.js +++ b/src/collections/Menu/MenuHeader.js @@ -22,7 +22,7 @@ function MenuHeader(props) { MenuHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Menu/MenuItem.js b/src/collections/Menu/MenuItem.js index dc96e0d5ce..6aacfa2e6a 100644 --- a/src/collections/Menu/MenuItem.js +++ b/src/collections/Menu/MenuItem.js @@ -21,7 +21,7 @@ import Icon from '../../elements/Icon' export default class MenuItem extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A menu item can be active. */ active: PropTypes.bool, diff --git a/src/collections/Menu/MenuMenu.js b/src/collections/Menu/MenuMenu.js index bfd6769e64..2dc8b05ae4 100644 --- a/src/collections/Menu/MenuMenu.js +++ b/src/collections/Menu/MenuMenu.js @@ -23,7 +23,7 @@ function MenuMenu(props) { MenuMenu.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Message/Message.js b/src/collections/Message/Message.js index 8033e5e0eb..ae6a08f06a 100644 --- a/src/collections/Message/Message.js +++ b/src/collections/Message/Message.js @@ -26,7 +26,7 @@ import MessageItem from './MessageItem' export default class Message extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A message can be formatted to attach itself to other content. */ attached: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['bottom', 'top'])]), diff --git a/src/collections/Message/MessageContent.js b/src/collections/Message/MessageContent.js index 08f9086b87..b87991a827 100644 --- a/src/collections/Message/MessageContent.js +++ b/src/collections/Message/MessageContent.js @@ -22,7 +22,7 @@ function MessageContent(props) { MessageContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Message/MessageHeader.js b/src/collections/Message/MessageHeader.js index 0999207ab9..f9018f7006 100644 --- a/src/collections/Message/MessageHeader.js +++ b/src/collections/Message/MessageHeader.js @@ -28,7 +28,7 @@ function MessageHeader(props) { MessageHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Message/MessageItem.js b/src/collections/Message/MessageItem.js index 93f58e307c..25c94a2f48 100644 --- a/src/collections/Message/MessageItem.js +++ b/src/collections/Message/MessageItem.js @@ -28,7 +28,7 @@ function MessageItem(props) { MessageItem.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Message/MessageList.js b/src/collections/Message/MessageList.js index 30ac441e17..e7cecfb14d 100644 --- a/src/collections/Message/MessageList.js +++ b/src/collections/Message/MessageList.js @@ -30,7 +30,7 @@ function MessageList(props) { MessageList.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Table/Table.js b/src/collections/Table/Table.js index a983f70a79..dadd102f9e 100644 --- a/src/collections/Table/Table.js +++ b/src/collections/Table/Table.js @@ -121,7 +121,7 @@ Table.defaultProps = { Table.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Attach table to other content */ attached: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['top', 'bottom'])]), diff --git a/src/collections/Table/TableBody.js b/src/collections/Table/TableBody.js index 20b140d7ab..b23aa0d8f3 100644 --- a/src/collections/Table/TableBody.js +++ b/src/collections/Table/TableBody.js @@ -2,7 +2,7 @@ import cx from 'classnames' import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' function TableBody(props) { const { children, className } = props @@ -23,7 +23,7 @@ TableBody.defaultProps = { TableBody.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Table/TableCell.js b/src/collections/Table/TableCell.js index 695fd0b057..10331e3a6c 100644 --- a/src/collections/Table/TableCell.js +++ b/src/collections/Table/TableCell.js @@ -80,7 +80,7 @@ TableCell.defaultProps = { TableCell.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A cell can be active or selected by a user. */ active: PropTypes.bool, diff --git a/src/collections/Table/TableFooter.js b/src/collections/Table/TableFooter.js index 9f3c16552b..0f6d7e0989 100644 --- a/src/collections/Table/TableFooter.js +++ b/src/collections/Table/TableFooter.js @@ -1,6 +1,7 @@ +import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getUnhandledProps } from '../../lib' +import { getUnhandledProps } from '../../lib' import TableHeader from './TableHeader' /** @@ -15,7 +16,7 @@ function TableFooter(props) { TableFooter.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, } TableFooter.defaultProps = { diff --git a/src/collections/Table/TableHeader.js b/src/collections/Table/TableHeader.js index f1eb15faa0..56f1b5279e 100644 --- a/src/collections/Table/TableHeader.js +++ b/src/collections/Table/TableHeader.js @@ -32,7 +32,7 @@ TableHeader.defaultProps = { TableHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/collections/Table/TableHeaderCell.js b/src/collections/Table/TableHeaderCell.js index 57032f6649..221289a658 100644 --- a/src/collections/Table/TableHeaderCell.js +++ b/src/collections/Table/TableHeaderCell.js @@ -2,7 +2,7 @@ import cx from 'classnames' import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getUnhandledProps, useValueAndKey } from '../../lib' +import { getUnhandledProps, useValueAndKey } from '../../lib' import TableCell from './TableCell' /** @@ -18,7 +18,7 @@ function TableHeaderCell(props) { TableHeaderCell.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/collections/Table/TableRow.js b/src/collections/Table/TableRow.js index 785a9458d4..e8366bab57 100644 --- a/src/collections/Table/TableRow.js +++ b/src/collections/Table/TableRow.js @@ -71,13 +71,13 @@ TableRow.defaultProps = { TableRow.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A row can be active or selected by a user. */ active: PropTypes.bool, /** An element type to render as (string or function). */ - cellAs: customPropTypes.as, + cellAs: PropTypes.elementType, /** Shorthand array of props for TableCell. */ cells: customPropTypes.collectionShorthand, diff --git a/src/elements/Button/Button.js b/src/elements/Button/Button.js index a26f0d3cad..d68373075d 100644 --- a/src/elements/Button/Button.js +++ b/src/elements/Button/Button.js @@ -30,7 +30,7 @@ import ButtonOr from './ButtonOr' class Button extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A button can show it is currently the active user selection. */ active: PropTypes.bool, diff --git a/src/elements/Button/ButtonContent.js b/src/elements/Button/ButtonContent.js index 0ad65c3059..36a5251005 100644 --- a/src/elements/Button/ButtonContent.js +++ b/src/elements/Button/ButtonContent.js @@ -33,7 +33,7 @@ function ButtonContent(props) { ButtonContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Button/ButtonGroup.js b/src/elements/Button/ButtonGroup.js index 9c25e8a83e..842ca1bbca 100644 --- a/src/elements/Button/ButtonGroup.js +++ b/src/elements/Button/ButtonGroup.js @@ -86,7 +86,7 @@ function ButtonGroup(props) { ButtonGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Groups can be attached to other content. */ attached: PropTypes.oneOfType([ diff --git a/src/elements/Button/ButtonOr.js b/src/elements/Button/ButtonOr.js index 6605030688..6d88e0baa9 100644 --- a/src/elements/Button/ButtonOr.js +++ b/src/elements/Button/ButtonOr.js @@ -2,7 +2,7 @@ import cx from 'classnames' import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' /** * Button groups can contain conditionals. @@ -18,7 +18,7 @@ function ButtonOr(props) { ButtonOr.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/elements/Container/Container.js b/src/elements/Container/Container.js index 622a13f464..e9a057aa5b 100644 --- a/src/elements/Container/Container.js +++ b/src/elements/Container/Container.js @@ -37,7 +37,7 @@ function Container(props) { Container.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Divider/Divider.js b/src/elements/Divider/Divider.js index e2e4a391e5..3dea700ca7 100644 --- a/src/elements/Divider/Divider.js +++ b/src/elements/Divider/Divider.js @@ -51,7 +51,7 @@ function Divider(props) { Divider.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Flag/Flag.js b/src/elements/Flag/Flag.js index e2cc918dc5..e6c35dc5f8 100644 --- a/src/elements/Flag/Flag.js +++ b/src/elements/Flag/Flag.js @@ -510,7 +510,7 @@ export const names = [ class Flag extends PureComponent { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/elements/Header/Header.js b/src/elements/Header/Header.js index 5802181eb8..180bea28bc 100644 --- a/src/elements/Header/Header.js +++ b/src/elements/Header/Header.js @@ -99,7 +99,7 @@ function Header(props) { Header.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Attach header to other content, like a segment. */ attached: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['top', 'bottom'])]), diff --git a/src/elements/Header/HeaderContent.js b/src/elements/Header/HeaderContent.js index 5908e7987e..935f315b56 100644 --- a/src/elements/Header/HeaderContent.js +++ b/src/elements/Header/HeaderContent.js @@ -22,7 +22,7 @@ function HeaderContent(props) { HeaderContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Header/HeaderSubheader.js b/src/elements/Header/HeaderSubheader.js index 9bdf6279ec..02db21d4f9 100644 --- a/src/elements/Header/HeaderSubheader.js +++ b/src/elements/Header/HeaderSubheader.js @@ -28,7 +28,7 @@ function HeaderSubheader(props) { HeaderSubheader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Icon/Icon.js b/src/elements/Icon/Icon.js index 50ca3a5652..3a0106518b 100644 --- a/src/elements/Icon/Icon.js +++ b/src/elements/Icon/Icon.js @@ -22,7 +22,7 @@ import IconGroup from './IconGroup' class Icon extends PureComponent { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Formatted to appear bordered. */ bordered: PropTypes.bool, diff --git a/src/elements/Icon/IconGroup.js b/src/elements/Icon/IconGroup.js index b7d645c2ee..d04ed8503d 100644 --- a/src/elements/Icon/IconGroup.js +++ b/src/elements/Icon/IconGroup.js @@ -23,7 +23,7 @@ function IconGroup(props) { IconGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Image/Image.js b/src/elements/Image/Image.js index af2d29ffc8..ef5cc9ee4f 100644 --- a/src/elements/Image/Image.js +++ b/src/elements/Image/Image.js @@ -112,7 +112,7 @@ Image.Group = ImageGroup Image.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** An image may be formatted to appear inline with text as an avatar. */ avatar: PropTypes.bool, diff --git a/src/elements/Image/ImageGroup.js b/src/elements/Image/ImageGroup.js index cbd55c34b9..057ee34fbf 100644 --- a/src/elements/Image/ImageGroup.js +++ b/src/elements/Image/ImageGroup.js @@ -22,7 +22,7 @@ function ImageGroup(props) { ImageGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Input/Input.js b/src/elements/Input/Input.js index cfcac07e8c..e40d394fa6 100644 --- a/src/elements/Input/Input.js +++ b/src/elements/Input/Input.js @@ -29,7 +29,7 @@ import Label from '../Label' class Input extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** An Input can be formatted to alert the user to an action they may perform. */ action: PropTypes.oneOfType([PropTypes.bool, customPropTypes.itemShorthand]), diff --git a/src/elements/Label/Label.js b/src/elements/Label/Label.js index 1d9bcba06a..748a891777 100644 --- a/src/elements/Label/Label.js +++ b/src/elements/Label/Label.js @@ -25,7 +25,7 @@ import LabelGroup from './LabelGroup' export default class Label extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A label can be active. */ active: PropTypes.bool, diff --git a/src/elements/Label/LabelDetail.js b/src/elements/Label/LabelDetail.js index cb8bae3f6c..1e7a9e7005 100644 --- a/src/elements/Label/LabelDetail.js +++ b/src/elements/Label/LabelDetail.js @@ -25,7 +25,7 @@ function LabelDetail(props) { LabelDetail.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Label/LabelGroup.js b/src/elements/Label/LabelGroup.js index 9bce49d2d2..4f9834c48b 100644 --- a/src/elements/Label/LabelGroup.js +++ b/src/elements/Label/LabelGroup.js @@ -38,7 +38,7 @@ function LabelGroup(props) { LabelGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/List/List.js b/src/elements/List/List.js index 12fd0495ad..04a2151fde 100644 --- a/src/elements/List/List.js +++ b/src/elements/List/List.js @@ -27,7 +27,7 @@ import ListList from './ListList' class List extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A list can animate to set the current item apart from the list. */ animated: PropTypes.bool, diff --git a/src/elements/List/ListContent.js b/src/elements/List/ListContent.js index 76239bcb41..e1df7c0649 100644 --- a/src/elements/List/ListContent.js +++ b/src/elements/List/ListContent.js @@ -49,7 +49,7 @@ function ListContent(props) { ListContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/List/ListDescription.js b/src/elements/List/ListDescription.js index 9ae342b11f..26bdd76dc1 100644 --- a/src/elements/List/ListDescription.js +++ b/src/elements/List/ListDescription.js @@ -28,7 +28,7 @@ function ListDescription(props) { ListDescription.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/List/ListHeader.js b/src/elements/List/ListHeader.js index 3cc1f59710..cfc12a8641 100644 --- a/src/elements/List/ListHeader.js +++ b/src/elements/List/ListHeader.js @@ -28,7 +28,7 @@ function ListHeader(props) { ListHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/List/ListItem.js b/src/elements/List/ListItem.js index 3d210ff79f..a1e55ba0f1 100644 --- a/src/elements/List/ListItem.js +++ b/src/elements/List/ListItem.js @@ -23,7 +23,7 @@ import ListIcon from './ListIcon' class ListItem extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A list item can active. */ active: PropTypes.bool, diff --git a/src/elements/List/ListList.js b/src/elements/List/ListList.js index 16cc17fdb4..edde987323 100644 --- a/src/elements/List/ListList.js +++ b/src/elements/List/ListList.js @@ -29,7 +29,7 @@ function ListList(props) { ListList.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Loader/Loader.js b/src/elements/Loader/Loader.js index c38b246954..43c774a762 100644 --- a/src/elements/Loader/Loader.js +++ b/src/elements/Loader/Loader.js @@ -53,7 +53,7 @@ function Loader(props) { Loader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A loader can be active or visible. */ active: PropTypes.bool, diff --git a/src/elements/Placeholder/Placeholder.js b/src/elements/Placeholder/Placeholder.js index 5b9b894fd1..db1e592fa4 100644 --- a/src/elements/Placeholder/Placeholder.js +++ b/src/elements/Placeholder/Placeholder.js @@ -38,7 +38,7 @@ function Placeholder(props) { Placeholder.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Placeholder/PlaceholderHeader.js b/src/elements/Placeholder/PlaceholderHeader.js index adb494bf19..254368ad87 100644 --- a/src/elements/Placeholder/PlaceholderHeader.js +++ b/src/elements/Placeholder/PlaceholderHeader.js @@ -28,7 +28,7 @@ function PlaceholderHeader(props) { PlaceholderHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Placeholder/PlaceholderImage.js b/src/elements/Placeholder/PlaceholderImage.js index 8910bc906e..53eaabf88d 100644 --- a/src/elements/Placeholder/PlaceholderImage.js +++ b/src/elements/Placeholder/PlaceholderImage.js @@ -23,7 +23,7 @@ function PlaceholderImage(props) { PlaceholderImage.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/elements/Placeholder/PlaceholderLine.js b/src/elements/Placeholder/PlaceholderLine.js index 23553e5463..05d86f1143 100644 --- a/src/elements/Placeholder/PlaceholderLine.js +++ b/src/elements/Placeholder/PlaceholderLine.js @@ -2,7 +2,7 @@ import cx from 'classnames' import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' /** * A placeholder can contain have lines of text. @@ -18,7 +18,7 @@ function PlaceholderLine(props) { PlaceholderLine.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/elements/Placeholder/PlaceholderParagraph.js b/src/elements/Placeholder/PlaceholderParagraph.js index 39ec88d84f..c4ee95db64 100644 --- a/src/elements/Placeholder/PlaceholderParagraph.js +++ b/src/elements/Placeholder/PlaceholderParagraph.js @@ -22,7 +22,7 @@ function PlaceholderParagraph(props) { PlaceholderParagraph.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Rail/Rail.js b/src/elements/Rail/Rail.js index 6bbd5c1756..537b2bef54 100644 --- a/src/elements/Rail/Rail.js +++ b/src/elements/Rail/Rail.js @@ -52,7 +52,7 @@ function Rail(props) { Rail.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A rail can appear attached to the main viewport. */ attached: PropTypes.bool, diff --git a/src/elements/Reveal/Reveal.js b/src/elements/Reveal/Reveal.js index e59b792518..f7a0be1c30 100644 --- a/src/elements/Reveal/Reveal.js +++ b/src/elements/Reveal/Reveal.js @@ -38,7 +38,7 @@ function Reveal(props) { Reveal.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** An active reveal displays its hidden content. */ active: PropTypes.bool, diff --git a/src/elements/Reveal/RevealContent.js b/src/elements/Reveal/RevealContent.js index f5bbc0a911..e28d1d3c12 100644 --- a/src/elements/Reveal/RevealContent.js +++ b/src/elements/Reveal/RevealContent.js @@ -35,7 +35,7 @@ function RevealContent(props) { RevealContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Segment/Segment.js b/src/elements/Segment/Segment.js index cb7ece7fcc..91686eeae2 100644 --- a/src/elements/Segment/Segment.js +++ b/src/elements/Segment/Segment.js @@ -87,7 +87,7 @@ Segment.Inline = SegmentInline Segment.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Attach segment to other content, like a header. */ attached: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['top', 'bottom'])]), diff --git a/src/elements/Segment/SegmentGroup.js b/src/elements/Segment/SegmentGroup.js index e314ba0e8b..31a2cead1d 100644 --- a/src/elements/Segment/SegmentGroup.js +++ b/src/elements/Segment/SegmentGroup.js @@ -41,7 +41,7 @@ function SegmentGroup(props) { SegmentGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Segment/SegmentInline.js b/src/elements/Segment/SegmentInline.js index edb1b09c87..4ea981a9d7 100644 --- a/src/elements/Segment/SegmentInline.js +++ b/src/elements/Segment/SegmentInline.js @@ -22,7 +22,7 @@ function SegmentInline(props) { SegmentInline.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Step/Step.js b/src/elements/Step/Step.js index 6bdefc8f8a..1069b301c6 100644 --- a/src/elements/Step/Step.js +++ b/src/elements/Step/Step.js @@ -23,7 +23,7 @@ import StepTitle from './StepTitle' class Step extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A step can be highlighted as active. */ active: PropTypes.bool, diff --git a/src/elements/Step/StepContent.js b/src/elements/Step/StepContent.js index eca9b779bd..29e14b6b8f 100644 --- a/src/elements/Step/StepContent.js +++ b/src/elements/Step/StepContent.js @@ -46,7 +46,7 @@ function StepContent(props) { StepContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Step/StepDescription.js b/src/elements/Step/StepDescription.js index 28a55978e9..16f13af903 100644 --- a/src/elements/Step/StepDescription.js +++ b/src/elements/Step/StepDescription.js @@ -25,7 +25,7 @@ function StepDescription(props) { StepDescription.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/elements/Step/StepGroup.js b/src/elements/Step/StepGroup.js index 3330a7c1d0..356eb5914b 100644 --- a/src/elements/Step/StepGroup.js +++ b/src/elements/Step/StepGroup.js @@ -77,7 +77,7 @@ function StepGroup(props) { StepGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Steps can be attached to other elements. */ attached: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['top', 'bottom'])]), diff --git a/src/elements/Step/StepTitle.js b/src/elements/Step/StepTitle.js index f9b73137d0..0bf9a63eec 100644 --- a/src/elements/Step/StepTitle.js +++ b/src/elements/Step/StepTitle.js @@ -28,7 +28,7 @@ function StepTitle(props) { StepTitle.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/lib/customPropTypes.js b/src/lib/customPropTypes.js index 0b736ca82f..9d1dc770b2 100644 --- a/src/lib/customPropTypes.js +++ b/src/lib/customPropTypes.js @@ -4,14 +4,6 @@ import leven from './leven' const typeOf = (...args) => Object.prototype.toString.call(...args) -/** - * Ensure a component can render as a give prop value. - */ -export const as = (...args) => - PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.string, PropTypes.symbol])( - ...args, - ) - /** * Ensure a prop is a valid DOM node. */ diff --git a/src/modules/Accordion/AccordionAccordion.js b/src/modules/Accordion/AccordionAccordion.js index 041ba97d06..377bf45af9 100644 --- a/src/modules/Accordion/AccordionAccordion.js +++ b/src/modules/Accordion/AccordionAccordion.js @@ -32,7 +32,7 @@ const warnIfPropsAreInvalid = (props, state) => { export default class AccordionAccordion extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Index of the currently active panel. */ activeIndex: customPropTypes.every([ diff --git a/src/modules/Accordion/AccordionContent.js b/src/modules/Accordion/AccordionContent.js index b3bfd399f7..9d24042b13 100644 --- a/src/modules/Accordion/AccordionContent.js +++ b/src/modules/Accordion/AccordionContent.js @@ -29,7 +29,7 @@ function AccordionContent(props) { AccordionContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Whether or not the content is visible. */ active: PropTypes.bool, diff --git a/src/modules/Accordion/AccordionTitle.js b/src/modules/Accordion/AccordionTitle.js index baa0a019cd..c0a1c63bc4 100644 --- a/src/modules/Accordion/AccordionTitle.js +++ b/src/modules/Accordion/AccordionTitle.js @@ -19,7 +19,7 @@ import Icon from '../../elements/Icon' export default class AccordionTitle extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Whether or not the title is in the open state. */ active: PropTypes.bool, diff --git a/src/modules/Checkbox/Checkbox.js b/src/modules/Checkbox/Checkbox.js index b5ee7ac459..76f68cc342 100644 --- a/src/modules/Checkbox/Checkbox.js +++ b/src/modules/Checkbox/Checkbox.js @@ -26,7 +26,7 @@ const debug = makeDebugger('checkbox') export default class Checkbox extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Whether or not checkbox is checked. */ checked: PropTypes.bool, diff --git a/src/modules/Dimmer/DimmerDimmable.js b/src/modules/Dimmer/DimmerDimmable.js index 32e8164327..81bbc62b50 100644 --- a/src/modules/Dimmer/DimmerDimmable.js +++ b/src/modules/Dimmer/DimmerDimmable.js @@ -34,7 +34,7 @@ function DimmerDimmable(props) { DimmerDimmable.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A dimmable element can blur its contents. */ blurring: PropTypes.bool, diff --git a/src/modules/Dimmer/DimmerInner.js b/src/modules/Dimmer/DimmerInner.js index 2690849b17..dad0c75cab 100644 --- a/src/modules/Dimmer/DimmerInner.js +++ b/src/modules/Dimmer/DimmerInner.js @@ -20,7 +20,7 @@ import { export default class DimmerInner extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** An active dimmer will dim its parent container. */ active: PropTypes.bool, diff --git a/src/modules/Dropdown/Dropdown.js b/src/modules/Dropdown/Dropdown.js index b82be64c53..36d2773de1 100644 --- a/src/modules/Dropdown/Dropdown.js +++ b/src/modules/Dropdown/Dropdown.js @@ -40,7 +40,7 @@ const getKeyOrValue = (key, value) => (_.isNil(key) ? value : key) export default class Dropdown extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Label prefixed to an option added by a user. */ additionLabel: PropTypes.oneOfType([PropTypes.element, PropTypes.string]), diff --git a/src/modules/Dropdown/DropdownDivider.js b/src/modules/Dropdown/DropdownDivider.js index 3ef4a8e169..c76f01c9d0 100644 --- a/src/modules/Dropdown/DropdownDivider.js +++ b/src/modules/Dropdown/DropdownDivider.js @@ -2,7 +2,7 @@ import cx from 'classnames' import PropTypes from 'prop-types' import React from 'react' -import { customPropTypes, getElementType, getUnhandledProps } from '../../lib' +import { getElementType, getUnhandledProps } from '../../lib' /** * A dropdown menu can contain dividers to separate related content. @@ -18,7 +18,7 @@ function DropdownDivider(props) { DropdownDivider.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/modules/Dropdown/DropdownHeader.js b/src/modules/Dropdown/DropdownHeader.js index 2d99b4e217..440aa85a9f 100644 --- a/src/modules/Dropdown/DropdownHeader.js +++ b/src/modules/Dropdown/DropdownHeader.js @@ -39,7 +39,7 @@ function DropdownHeader(props) { DropdownHeader.propTypes = { /** An element type to render as (string or function) */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Dropdown/DropdownItem.js b/src/modules/Dropdown/DropdownItem.js index 90ae1fa3f6..abb57a84ff 100644 --- a/src/modules/Dropdown/DropdownItem.js +++ b/src/modules/Dropdown/DropdownItem.js @@ -23,7 +23,7 @@ import Label from '../../elements/Label' class DropdownItem extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Style as the currently chosen item. */ active: PropTypes.bool, diff --git a/src/modules/Dropdown/DropdownMenu.js b/src/modules/Dropdown/DropdownMenu.js index 1f882d899e..6053587e3a 100644 --- a/src/modules/Dropdown/DropdownMenu.js +++ b/src/modules/Dropdown/DropdownMenu.js @@ -34,7 +34,7 @@ function DropdownMenu(props) { DropdownMenu.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Dropdown/DropdownSearchInput.js b/src/modules/Dropdown/DropdownSearchInput.js index e9fa62918f..e22bf28522 100644 --- a/src/modules/Dropdown/DropdownSearchInput.js +++ b/src/modules/Dropdown/DropdownSearchInput.js @@ -3,7 +3,7 @@ import _ from 'lodash' import PropTypes from 'prop-types' import React, { Component } from 'react' -import { createShorthandFactory, customPropTypes, getUnhandledProps } from '../../lib' +import { createShorthandFactory, getUnhandledProps } from '../../lib' /** * A search item sub-component for Dropdown component. @@ -11,7 +11,7 @@ import { createShorthandFactory, customPropTypes, getUnhandledProps } from '../. class DropdownSearchInput extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** An input can have the auto complete. */ autoComplete: PropTypes.string, diff --git a/src/modules/Embed/Embed.js b/src/modules/Embed/Embed.js index 3205a82562..e5625ae8a4 100644 --- a/src/modules/Embed/Embed.js +++ b/src/modules/Embed/Embed.js @@ -19,7 +19,7 @@ import Icon from '../../elements/Icon' export default class Embed extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** An embed can be active. */ active: PropTypes.bool, diff --git a/src/modules/Modal/Modal.js b/src/modules/Modal/Modal.js index 94f6936526..d62993db11 100644 --- a/src/modules/Modal/Modal.js +++ b/src/modules/Modal/Modal.js @@ -36,7 +36,7 @@ const debug = makeDebugger('modal') class Modal extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Shorthand for Modal.Actions. Typically an array of button shorthand. */ actions: customPropTypes.itemShorthand, diff --git a/src/modules/Modal/ModalActions.js b/src/modules/Modal/ModalActions.js index aa438bcae2..5404b54210 100644 --- a/src/modules/Modal/ModalActions.js +++ b/src/modules/Modal/ModalActions.js @@ -18,7 +18,7 @@ import Button from '../../elements/Button' export default class ModalActions extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Array of shorthand buttons. */ actions: customPropTypes.collectionShorthand, diff --git a/src/modules/Modal/ModalContent.js b/src/modules/Modal/ModalContent.js index 76a4aa2b3d..8b3a0507d2 100644 --- a/src/modules/Modal/ModalContent.js +++ b/src/modules/Modal/ModalContent.js @@ -35,7 +35,7 @@ function ModalContent(props) { ModalContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Modal/ModalDescription.js b/src/modules/Modal/ModalDescription.js index 091b3e6ece..af842d2d01 100644 --- a/src/modules/Modal/ModalDescription.js +++ b/src/modules/Modal/ModalDescription.js @@ -22,7 +22,7 @@ function ModalDescription(props) { ModalDescription.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Modal/ModalHeader.js b/src/modules/Modal/ModalHeader.js index 215b1665d6..d6c38d320d 100644 --- a/src/modules/Modal/ModalHeader.js +++ b/src/modules/Modal/ModalHeader.js @@ -28,7 +28,7 @@ function ModalHeader(props) { ModalHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Popup/Popup.js b/src/modules/Popup/Popup.js index 821da136d5..62b956dd59 100644 --- a/src/modules/Popup/Popup.js +++ b/src/modules/Popup/Popup.js @@ -32,7 +32,7 @@ const debug = makeDebugger('popup') export default class Popup extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Display the popup without the pointing arrow. */ basic: PropTypes.bool, diff --git a/src/modules/Popup/PopupContent.js b/src/modules/Popup/PopupContent.js index 4e63392bee..14e5218cad 100644 --- a/src/modules/Popup/PopupContent.js +++ b/src/modules/Popup/PopupContent.js @@ -28,7 +28,7 @@ export default function PopupContent(props) { PopupContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** The content of the Popup */ children: PropTypes.node, diff --git a/src/modules/Popup/PopupHeader.js b/src/modules/Popup/PopupHeader.js index baf72644a7..7ef63616c6 100644 --- a/src/modules/Popup/PopupHeader.js +++ b/src/modules/Popup/PopupHeader.js @@ -28,7 +28,7 @@ export default function PopupHeader(props) { PopupHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Progress/Progress.js b/src/modules/Progress/Progress.js index 7c98c6255b..8430ef64ee 100644 --- a/src/modules/Progress/Progress.js +++ b/src/modules/Progress/Progress.js @@ -20,7 +20,7 @@ import { class Progress extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A progress bar can show activity. */ active: PropTypes.bool, diff --git a/src/modules/Rating/Rating.js b/src/modules/Rating/Rating.js index 0da458146d..001ce2a85a 100644 --- a/src/modules/Rating/Rating.js +++ b/src/modules/Rating/Rating.js @@ -5,7 +5,6 @@ import React from 'react' import { AutoControlledComponent as Component, - customPropTypes, getElementType, getUnhandledProps, SUI, @@ -19,7 +18,7 @@ import RatingIcon from './RatingIcon' export default class Rating extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/modules/Rating/RatingIcon.js b/src/modules/Rating/RatingIcon.js index d2428510df..2450394e83 100644 --- a/src/modules/Rating/RatingIcon.js +++ b/src/modules/Rating/RatingIcon.js @@ -4,7 +4,7 @@ import _ from 'lodash' import PropTypes from 'prop-types' import React, { Component } from 'react' -import { customPropTypes, getElementType, getUnhandledProps, useKeyOnly } from '../../lib' +import { getElementType, getUnhandledProps, useKeyOnly } from '../../lib' /** * An internal icon sub-component for Rating component @@ -12,7 +12,7 @@ import { customPropTypes, getElementType, getUnhandledProps, useKeyOnly } from ' export default class RatingIcon extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Indicates activity of an icon. */ active: PropTypes.bool, diff --git a/src/modules/Search/Search.js b/src/modules/Search/Search.js index 2fe7b4a69b..42099710b1 100644 --- a/src/modules/Search/Search.js +++ b/src/modules/Search/Search.js @@ -33,7 +33,7 @@ const debug = makeDebugger('search') export default class Search extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, // ------------------------------------ // Behavior diff --git a/src/modules/Search/SearchCategory.js b/src/modules/Search/SearchCategory.js index dcf27decb4..054798d21b 100644 --- a/src/modules/Search/SearchCategory.js +++ b/src/modules/Search/SearchCategory.js @@ -30,7 +30,7 @@ SearchCategory.defaultProps = { SearchCategory.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** The item currently selected by keyboard shortcut. */ active: PropTypes.bool, diff --git a/src/modules/Search/SearchResult.js b/src/modules/Search/SearchResult.js index a6a0060fe3..4281774db7 100644 --- a/src/modules/Search/SearchResult.js +++ b/src/modules/Search/SearchResult.js @@ -33,7 +33,7 @@ const defaultRenderer = ({ image, price, title, description }) => [ export default class SearchResult extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** The item currently selected by keyboard shortcut. */ active: PropTypes.bool, diff --git a/src/modules/Search/SearchResults.js b/src/modules/Search/SearchResults.js index 2eda6c0d49..03de0fd781 100644 --- a/src/modules/Search/SearchResults.js +++ b/src/modules/Search/SearchResults.js @@ -19,7 +19,7 @@ function SearchResults(props) { SearchResults.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Sidebar/Sidebar.js b/src/modules/Sidebar/Sidebar.js index 0be502ce11..6bc421f13b 100644 --- a/src/modules/Sidebar/Sidebar.js +++ b/src/modules/Sidebar/Sidebar.js @@ -22,7 +22,7 @@ import SidebarPusher from './SidebarPusher' class Sidebar extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Animation style. */ animation: PropTypes.oneOf([ diff --git a/src/modules/Sidebar/SidebarPushable.js b/src/modules/Sidebar/SidebarPushable.js index 9603f1072d..264beec7c4 100644 --- a/src/modules/Sidebar/SidebarPushable.js +++ b/src/modules/Sidebar/SidebarPushable.js @@ -22,7 +22,7 @@ function SidebarPushable(props) { SidebarPushable.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Sidebar/SidebarPusher.js b/src/modules/Sidebar/SidebarPusher.js index 22ecfb9fc3..ae791c7bd3 100644 --- a/src/modules/Sidebar/SidebarPusher.js +++ b/src/modules/Sidebar/SidebarPusher.js @@ -29,7 +29,7 @@ function SidebarPusher(props) { SidebarPusher.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/modules/Sticky/Sticky.js b/src/modules/Sticky/Sticky.js index 71ad5d039c..8ecdfb8297 100644 --- a/src/modules/Sticky/Sticky.js +++ b/src/modules/Sticky/Sticky.js @@ -18,7 +18,7 @@ import { export default class Sticky extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A Sticky can be active. */ active: PropTypes.bool, diff --git a/src/modules/Tab/Tab.js b/src/modules/Tab/Tab.js index d5d9fa3d51..2c1760d648 100644 --- a/src/modules/Tab/Tab.js +++ b/src/modules/Tab/Tab.js @@ -21,7 +21,7 @@ import TabPane from './TabPane' class Tab extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** The initial activeIndex. */ defaultActiveIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/src/modules/Tab/TabPane.js b/src/modules/Tab/TabPane.js index 00eb03f9b3..28eb2ce656 100644 --- a/src/modules/Tab/TabPane.js +++ b/src/modules/Tab/TabPane.js @@ -41,7 +41,7 @@ TabPane.defaultProps = { TabPane.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A tab pane can be active. */ active: PropTypes.bool, diff --git a/src/modules/Transition/TransitionGroup.js b/src/modules/Transition/TransitionGroup.js index 524daaa91c..bb3e5c7014 100644 --- a/src/modules/Transition/TransitionGroup.js +++ b/src/modules/Transition/TransitionGroup.js @@ -3,7 +3,6 @@ import PropTypes from 'prop-types' import React, { cloneElement, Fragment } from 'react' import { - customPropTypes, getChildMapping, getElementType, getUnhandledProps, @@ -21,7 +20,7 @@ const debug = makeDebugger('transition_group') export default class TransitionGroup extends React.Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Named animation event to used. Must be defined in CSS. */ animation: PropTypes.oneOfType([PropTypes.oneOf(SUI.TRANSITIONS), PropTypes.string]), diff --git a/src/views/Advertisement/Advertisement.js b/src/views/Advertisement/Advertisement.js index 5ea8c264e0..b2b6cbe2b2 100644 --- a/src/views/Advertisement/Advertisement.js +++ b/src/views/Advertisement/Advertisement.js @@ -36,7 +36,7 @@ function Advertisement(props) { Advertisement.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Center the advertisement. */ centered: PropTypes.bool, diff --git a/src/views/Card/Card.js b/src/views/Card/Card.js index 000ee59625..bcf2c58e3c 100644 --- a/src/views/Card/Card.js +++ b/src/views/Card/Card.js @@ -23,7 +23,7 @@ import CardMeta from './CardMeta' export default class Card extends Component { static propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A Card can center itself inside its container. */ centered: PropTypes.bool, diff --git a/src/views/Card/CardContent.js b/src/views/Card/CardContent.js index 087da3d17a..2e8718ddf7 100644 --- a/src/views/Card/CardContent.js +++ b/src/views/Card/CardContent.js @@ -55,7 +55,7 @@ function CardContent(props) { CardContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Card/CardDescription.js b/src/views/Card/CardDescription.js index 609101c02a..5e63b84d8e 100644 --- a/src/views/Card/CardDescription.js +++ b/src/views/Card/CardDescription.js @@ -30,7 +30,7 @@ function CardDescription(props) { CardDescription.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Card/CardGroup.js b/src/views/Card/CardGroup.js index c7bde16121..92baef7373 100644 --- a/src/views/Card/CardGroup.js +++ b/src/views/Card/CardGroup.js @@ -73,7 +73,7 @@ function CardGroup(props) { CardGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** A group of cards can center itself inside its container. */ centered: PropTypes.bool, diff --git a/src/views/Card/CardHeader.js b/src/views/Card/CardHeader.js index 1f1af6c28a..72e79c2ad1 100644 --- a/src/views/Card/CardHeader.js +++ b/src/views/Card/CardHeader.js @@ -30,7 +30,7 @@ function CardHeader(props) { CardHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Card/CardMeta.js b/src/views/Card/CardMeta.js index 1e40f75da8..9280f99e7d 100644 --- a/src/views/Card/CardMeta.js +++ b/src/views/Card/CardMeta.js @@ -30,7 +30,7 @@ function CardMeta(props) { CardMeta.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Comment/Comment.js b/src/views/Comment/Comment.js index e488ee02f4..fa5df318f6 100644 --- a/src/views/Comment/Comment.js +++ b/src/views/Comment/Comment.js @@ -37,7 +37,7 @@ function Comment(props) { Comment.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Comment/CommentAction.js b/src/views/Comment/CommentAction.js index 38459c89e0..d8dfe3466f 100644 --- a/src/views/Comment/CommentAction.js +++ b/src/views/Comment/CommentAction.js @@ -33,7 +33,7 @@ CommentAction.defaultProps = { CommentAction.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Style as the currently active action. */ active: PropTypes.bool, diff --git a/src/views/Comment/CommentActions.js b/src/views/Comment/CommentActions.js index 9814a57a30..d3f9cd8b88 100644 --- a/src/views/Comment/CommentActions.js +++ b/src/views/Comment/CommentActions.js @@ -22,7 +22,7 @@ function CommentActions(props) { CommentActions.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Comment/CommentAuthor.js b/src/views/Comment/CommentAuthor.js index 20f2ee191a..bf8d60a3de 100644 --- a/src/views/Comment/CommentAuthor.js +++ b/src/views/Comment/CommentAuthor.js @@ -22,7 +22,7 @@ function CommentAuthor(props) { CommentAuthor.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Comment/CommentAvatar.js b/src/views/Comment/CommentAvatar.js index 92376e8fe3..a46c8761c2 100644 --- a/src/views/Comment/CommentAvatar.js +++ b/src/views/Comment/CommentAvatar.js @@ -4,7 +4,6 @@ import React from 'react' import { createHTMLImage, - customPropTypes, getElementType, getUnhandledProps, htmlImageProps, @@ -31,7 +30,7 @@ function CommentAvatar(props) { CommentAvatar.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Additional classes. */ className: PropTypes.string, diff --git a/src/views/Comment/CommentContent.js b/src/views/Comment/CommentContent.js index 077a2a3b0a..d8766ad719 100644 --- a/src/views/Comment/CommentContent.js +++ b/src/views/Comment/CommentContent.js @@ -22,7 +22,7 @@ function CommentContent(props) { CommentContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Comment/CommentGroup.js b/src/views/Comment/CommentGroup.js index 57b6b54ff4..0846b9175e 100644 --- a/src/views/Comment/CommentGroup.js +++ b/src/views/Comment/CommentGroup.js @@ -39,7 +39,7 @@ function CommentGroup(props) { CommentGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Comment/CommentMetadata.js b/src/views/Comment/CommentMetadata.js index d47ebf2574..d966171770 100644 --- a/src/views/Comment/CommentMetadata.js +++ b/src/views/Comment/CommentMetadata.js @@ -22,7 +22,7 @@ function CommentMetadata(props) { CommentMetadata.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Comment/CommentText.js b/src/views/Comment/CommentText.js index b13d7e1785..9248c52907 100644 --- a/src/views/Comment/CommentText.js +++ b/src/views/Comment/CommentText.js @@ -22,7 +22,7 @@ function CommentText(props) { CommentText.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/Feed.js b/src/views/Feed/Feed.js index 2a1a716037..aaeed20f93 100644 --- a/src/views/Feed/Feed.js +++ b/src/views/Feed/Feed.js @@ -48,7 +48,7 @@ function Feed(props) { Feed.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedContent.js b/src/views/Feed/FeedContent.js index f2f19eb6c0..6081ab9321 100644 --- a/src/views/Feed/FeedContent.js +++ b/src/views/Feed/FeedContent.js @@ -49,7 +49,7 @@ function FeedContent(props) { FeedContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedDate.js b/src/views/Feed/FeedDate.js index af73f24bb5..afa36c0ea7 100644 --- a/src/views/Feed/FeedDate.js +++ b/src/views/Feed/FeedDate.js @@ -22,7 +22,7 @@ function FeedDate(props) { FeedDate.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedEvent.js b/src/views/Feed/FeedEvent.js index 0edef4b413..25fbd9e64e 100644 --- a/src/views/Feed/FeedEvent.js +++ b/src/views/Feed/FeedEvent.js @@ -42,7 +42,7 @@ function FeedEvent(props) { FeedEvent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedExtra.js b/src/views/Feed/FeedExtra.js index 55c6b0108a..902b3394d4 100644 --- a/src/views/Feed/FeedExtra.js +++ b/src/views/Feed/FeedExtra.js @@ -51,7 +51,7 @@ function FeedExtra(props) { FeedExtra.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedLabel.js b/src/views/Feed/FeedLabel.js index c83055c21b..5ef55b8004 100644 --- a/src/views/Feed/FeedLabel.js +++ b/src/views/Feed/FeedLabel.js @@ -40,7 +40,7 @@ function FeedLabel(props) { FeedLabel.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedLike.js b/src/views/Feed/FeedLike.js index 69eda7895d..ffcd6328ed 100644 --- a/src/views/Feed/FeedLike.js +++ b/src/views/Feed/FeedLike.js @@ -37,7 +37,7 @@ FeedLike.defaultProps = { FeedLike.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedMeta.js b/src/views/Feed/FeedMeta.js index bf9c602e32..f2209e882d 100644 --- a/src/views/Feed/FeedMeta.js +++ b/src/views/Feed/FeedMeta.js @@ -39,7 +39,7 @@ function FeedMeta(props) { FeedMeta.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedSummary.js b/src/views/Feed/FeedSummary.js index 590c50dbff..408228e927 100644 --- a/src/views/Feed/FeedSummary.js +++ b/src/views/Feed/FeedSummary.js @@ -41,7 +41,7 @@ function FeedSummary(props) { FeedSummary.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Feed/FeedUser.js b/src/views/Feed/FeedUser.js index 6f2f3ad8aa..886ba19fa2 100644 --- a/src/views/Feed/FeedUser.js +++ b/src/views/Feed/FeedUser.js @@ -22,7 +22,7 @@ function FeedUser(props) { FeedUser.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Item/Item.js b/src/views/Item/Item.js index 30d1bcbce8..3040136d21 100644 --- a/src/views/Item/Item.js +++ b/src/views/Item/Item.js @@ -54,7 +54,7 @@ Item.Meta = ItemMeta Item.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Item/ItemContent.js b/src/views/Item/ItemContent.js index 858932bd0a..6540c684c5 100644 --- a/src/views/Item/ItemContent.js +++ b/src/views/Item/ItemContent.js @@ -46,7 +46,7 @@ function ItemContent(props) { ItemContent.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Item/ItemDescription.js b/src/views/Item/ItemDescription.js index f2aca5cbca..34060801d4 100644 --- a/src/views/Item/ItemDescription.js +++ b/src/views/Item/ItemDescription.js @@ -28,7 +28,7 @@ function ItemDescription(props) { ItemDescription.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Item/ItemExtra.js b/src/views/Item/ItemExtra.js index ab28a8f6f9..0cec2b4d12 100644 --- a/src/views/Item/ItemExtra.js +++ b/src/views/Item/ItemExtra.js @@ -28,7 +28,7 @@ function ItemExtra(props) { ItemExtra.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Item/ItemGroup.js b/src/views/Item/ItemGroup.js index 206c25ba9f..7ed12bc317 100644 --- a/src/views/Item/ItemGroup.js +++ b/src/views/Item/ItemGroup.js @@ -64,7 +64,7 @@ function ItemGroup(props) { ItemGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Item/ItemHeader.js b/src/views/Item/ItemHeader.js index bbf06c0fea..1cd7786188 100644 --- a/src/views/Item/ItemHeader.js +++ b/src/views/Item/ItemHeader.js @@ -28,7 +28,7 @@ function ItemHeader(props) { ItemHeader.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Item/ItemMeta.js b/src/views/Item/ItemMeta.js index 22f6c3fd56..2272d820d6 100644 --- a/src/views/Item/ItemMeta.js +++ b/src/views/Item/ItemMeta.js @@ -28,7 +28,7 @@ function ItemMeta(props) { ItemMeta.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Statistic/Statistic.js b/src/views/Statistic/Statistic.js index d31241b261..043dea3d54 100644 --- a/src/views/Statistic/Statistic.js +++ b/src/views/Statistic/Statistic.js @@ -76,7 +76,7 @@ function Statistic(props) { Statistic.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Statistic/StatisticGroup.js b/src/views/Statistic/StatisticGroup.js index 7ee1dc4913..425267a497 100644 --- a/src/views/Statistic/StatisticGroup.js +++ b/src/views/Statistic/StatisticGroup.js @@ -57,7 +57,7 @@ function StatisticGroup(props) { StatisticGroup.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Statistic/StatisticLabel.js b/src/views/Statistic/StatisticLabel.js index df485c887e..6f763d35f4 100644 --- a/src/views/Statistic/StatisticLabel.js +++ b/src/views/Statistic/StatisticLabel.js @@ -28,7 +28,7 @@ function StatisticLabel(props) { StatisticLabel.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node, diff --git a/src/views/Statistic/StatisticValue.js b/src/views/Statistic/StatisticValue.js index 588e3e2aeb..59373fa319 100644 --- a/src/views/Statistic/StatisticValue.js +++ b/src/views/Statistic/StatisticValue.js @@ -30,7 +30,7 @@ function StatisticValue(props) { StatisticValue.propTypes = { /** An element type to render as (string or function). */ - as: customPropTypes.as, + as: PropTypes.elementType, /** Primary content. */ children: PropTypes.node,