Skip to content

Commit 128e95d

Browse files
authored
chore(lib): remove customPropTypes.as (#3751)
1 parent 9d428b0 commit 128e95d

150 files changed

Lines changed: 175 additions & 193 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ A docblock should appear above each prop in `propTypes` to describe them:
486486
```js
487487
Label.propTypes = {
488488
/** An element type to render as (string or function). */
489-
as: customPropTypes.as,
489+
as: PropTypes.elementType,
490490

491491
/** A label can reduce its complexity. */
492492
basic: PropTypes.bool,

src/addons/Responsive/Responsive.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ import _ from 'lodash'
22
import PropTypes from 'prop-types'
33
import React, { Component } from 'react'
44

5-
import {
6-
customPropTypes,
7-
eventStack,
8-
getElementType,
9-
getUnhandledProps,
10-
isBrowser,
11-
} from '../../lib'
5+
import { eventStack, getElementType, getUnhandledProps, isBrowser } from '../../lib'
126
import isVisible from './lib/isVisible'
137

148
/**
@@ -17,7 +11,7 @@ import isVisible from './lib/isVisible'
1711
export default class Responsive extends Component {
1812
static propTypes = {
1913
/** An element type to render as (string or function). */
20-
as: customPropTypes.as,
14+
as: PropTypes.elementType,
2115

2216
/** Primary content. */
2317
children: PropTypes.node,

src/addons/TextArea/TextArea.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
33
import React, { Component, createRef } from 'react'
44

55
import Ref from '../Ref'
6-
import { customPropTypes, getElementType, getUnhandledProps } from '../../lib'
6+
import { getElementType, getUnhandledProps } from '../../lib'
77

88
/**
99
* A TextArea can be used to allow for extended user input.
@@ -12,7 +12,7 @@ import { customPropTypes, getElementType, getUnhandledProps } from '../../lib'
1212
class TextArea extends Component {
1313
static propTypes = {
1414
/** An element type to render as (string or function). */
15-
as: customPropTypes.as,
15+
as: PropTypes.elementType,
1616

1717
/**
1818
* Called on change.

src/behaviors/Visibility/Visibility.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import React, { Component, createRef } from 'react'
55
import Ref from '../../addons/Ref'
66
import {
77
eventStack,
8-
customPropTypes,
98
getElementType,
109
getUnhandledProps,
1110
normalizeOffset,
@@ -18,7 +17,7 @@ import {
1817
export default class Visibility extends Component {
1918
static propTypes = {
2019
/** An element type to render as (string or function). */
21-
as: customPropTypes.as,
20+
as: PropTypes.elementType,
2221

2322
/** Primary content. */
2423
children: PropTypes.node,

src/collections/Breadcrumb/Breadcrumb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function Breadcrumb(props) {
4848

4949
Breadcrumb.propTypes = {
5050
/** An element type to render as (string or function). */
51-
as: customPropTypes.as,
51+
as: PropTypes.elementType,
5252

5353
/** Primary content. */
5454
children: PropTypes.node,

src/collections/Breadcrumb/BreadcrumbDivider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function BreadcrumbDivider(props) {
4646

4747
BreadcrumbDivider.propTypes = {
4848
/** An element type to render as (string or function). */
49-
as: customPropTypes.as,
49+
as: PropTypes.elementType,
5050

5151
/** Primary content. */
5252
children: PropTypes.node,

src/collections/Breadcrumb/BreadcrumbSection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
export default class BreadcrumbSection extends Component {
1919
static propTypes = {
2020
/** An element type to render as (string or function). */
21-
as: customPropTypes.as,
21+
as: PropTypes.elementType,
2222

2323
/** Style as the currently active section. */
2424
active: PropTypes.bool,

src/collections/Form/Form.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@ import _ from 'lodash'
33
import PropTypes from 'prop-types'
44
import React, { Component } from 'react'
55

6-
import {
7-
customPropTypes,
8-
getElementType,
9-
getUnhandledProps,
10-
SUI,
11-
useKeyOnly,
12-
useWidthProp,
13-
} from '../../lib'
6+
import { getElementType, getUnhandledProps, SUI, useKeyOnly, useWidthProp } from '../../lib'
147
import FormButton from './FormButton'
158
import FormCheckbox from './FormCheckbox'
169
import FormDropdown from './FormDropdown'
@@ -35,7 +28,7 @@ import FormTextArea from './FormTextArea'
3528
class Form extends Component {
3629
static propTypes = {
3730
/** An element type to render as (string or function). */
38-
as: customPropTypes.as,
31+
as: PropTypes.elementType,
3932

4033
/** The HTML form action */
4134
action: PropTypes.string,

src/collections/Form/FormButton.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import PropTypes from 'prop-types'
12
import React from 'react'
23

3-
import { customPropTypes, getElementType, getUnhandledProps } from '../../lib'
4+
import { getElementType, getUnhandledProps } from '../../lib'
45
import Button from '../../elements/Button'
56
import FormField from './FormField'
67

@@ -19,7 +20,7 @@ function FormButton(props) {
1920

2021
FormButton.propTypes = {
2122
/** An element type to render as (string or function). */
22-
as: customPropTypes.as,
23+
as: PropTypes.elementType,
2324

2425
/** A FormField control prop. */
2526
control: FormField.propTypes.control,

src/collections/Form/FormCheckbox.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import PropTypes from 'prop-types'
12
import React from 'react'
23

3-
import { customPropTypes, getElementType, getUnhandledProps } from '../../lib'
4+
import { getElementType, getUnhandledProps } from '../../lib'
45
import Checkbox from '../../modules/Checkbox'
56
import FormField from './FormField'
67

@@ -19,7 +20,7 @@ function FormCheckbox(props) {
1920

2021
FormCheckbox.propTypes = {
2122
/** An element type to render as (string or function). */
22-
as: customPropTypes.as,
23+
as: PropTypes.elementType,
2324

2425
/** A FormField control prop. */
2526
control: FormField.propTypes.control,

0 commit comments

Comments
 (0)