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

chore(lib): remove customPropTypes.as #3751

Merged
merged 1 commit into from
Aug 19, 2019
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 .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 2 additions & 8 deletions src/addons/Responsive/Responsive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

/**
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/addons/TextArea/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions src/behaviors/Visibility/Visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import React, { Component, createRef } from 'react'
import Ref from '../../addons/Ref'
import {
eventStack,
customPropTypes,
getElementType,
getUnhandledProps,
normalizeOffset,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Breadcrumb/Breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Breadcrumb/BreadcrumbDivider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Breadcrumb/BreadcrumbSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 2 additions & 9 deletions src/collections/Form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/collections/Form/FormButton.js
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/collections/Form/FormCheckbox.js
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/collections/Form/FormDropdown.js
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Form/FormField.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Form/FormGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/collections/Form/FormInput.js
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/collections/Form/FormRadio.js
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/collections/Form/FormSelect.js
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/collections/Form/FormTextArea.js
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Grid/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'])]),
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Grid/GridColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Grid/GridRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/MenuHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Menu/MenuMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'])]),
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Message/MessageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/collections/Table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'])]),
Expand Down
4 changes: 2 additions & 2 deletions src/collections/Table/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
Loading