Skip to content

Commit

Permalink
Omit null if optional and make props with React.ReactNode optional
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed Jul 10, 2019
1 parent 10960a3 commit 6a1a14b
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function renderInput(inputProps) {
renderInput.propTypes = {
classes: PropTypes.object.isRequired,
InputProps: PropTypes.object,
ref: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.func, PropTypes.object]),
ref: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
};

function renderSuggestion(suggestionProps) {
Expand Down
16 changes: 8 additions & 8 deletions docs/src/pages/components/autocomplete/IntegrationReactSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ NoOptionsMessage.propTypes = {
/**
* The children to be rendered.
*/
children: PropTypes.node.isRequired,
children: PropTypes.node,
/**
* Props to be passed on to the wrapper.
*/
Expand All @@ -130,7 +130,7 @@ function inputComponent({ inputRef, ...props }) {
}

inputComponent.propTypes = {
inputRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.func, PropTypes.object]),
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
};

function Control(props) {
Expand Down Expand Up @@ -162,7 +162,7 @@ Control.propTypes = {
/**
* Children to render.
*/
children: PropTypes.node.isRequired,
children: PropTypes.node,
/**
* The mouse down event and the innerRef to pass down to the controller element.
*/
Expand Down Expand Up @@ -192,7 +192,7 @@ Option.propTypes = {
/**
* The children to be rendered.
*/
children: PropTypes.node.isRequired,
children: PropTypes.node,
/**
* props passed to the wrapping element for the group.
*/
Expand Down Expand Up @@ -228,7 +228,7 @@ Placeholder.propTypes = {
/**
* The children to be rendered.
*/
children: PropTypes.node.isRequired,
children: PropTypes.node,
/**
* props passed to the wrapping element for the group.
*/
Expand All @@ -248,7 +248,7 @@ SingleValue.propTypes = {
/**
* The children to be rendered.
*/
children: PropTypes.node.isRequired,
children: PropTypes.node,
/**
* Props passed to the wrapping element for the group.
*/
Expand All @@ -264,7 +264,7 @@ ValueContainer.propTypes = {
/**
* The children to be rendered.
*/
children: PropTypes.node.isRequired,
children: PropTypes.node,
selectProps: PropTypes.object.isRequired,
};

Expand All @@ -283,7 +283,7 @@ function MultiValue(props) {
}

MultiValue.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
isFocused: PropTypes.bool.isRequired,
removeProps: PropTypes.object.isRequired,
selectProps: PropTypes.object.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function TabContainer(props) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
dir: PropTypes.string,
};

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/tabs/FullWidthTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function TabContainer({ children, dir }) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
dir: PropTypes.string,
};

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/tabs/NavTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function TabContainer(props) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
};

function LinkTab(props) {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/tabs/ScrollableTabsButtonAuto.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function TabContainer(props) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
};

const useStyles = makeStyles(theme => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function TabContainer(props) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
};

const useStyles = makeStyles(theme => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function TabContainer(props) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
};

const useStyles = makeStyles(theme => ({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/tabs/SimpleTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function TabContainer(props) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
};

const useStyles = makeStyles(theme => ({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/tabs/TabsWrappedLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function TabContainer(props) {
}

TabContainer.propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
};

const useStyles = makeStyles(theme => ({
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/tooltips/CustomizedTooltips.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function ArrowTooltip(props) {
}

ArrowTooltip.propTypes = {
title: PropTypes.node.isRequired,
title: PropTypes.node,
};

const useStylesBootstrap = makeStyles(theme => ({
Expand Down Expand Up @@ -177,7 +177,7 @@ function BootstrapTooltip(props) {
}

BootstrapTooltip.propTypes = {
title: PropTypes.node.isRequired,
title: PropTypes.node,
};

const HtmlTooltip = withStyles(theme => ({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"styled-components": "^4.1.1",
"tslint": "5.14.0",
"typescript": "3.2.2",
"typescript-to-proptypes": "^1.0.3",
"typescript-to-proptypes": "^1.0.4",
"url-loader": "^1.0.1",
"vrtest": "^0.2.0",
"webfontloader": "^1.6.28",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13890,10 +13890,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript-to-proptypes@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/typescript-to-proptypes/-/typescript-to-proptypes-1.0.3.tgz#50a82675b80b006d57d932edfbb19d8ec212091f"
integrity sha512-PCUCwxtNn+x/dtlseY61S8NkxykT7qMbFaj7SoABwF6hCC3TrLqUHHhUuL9eF5WTnYQupTdt8l9u++pjTuxvxQ==
typescript-to-proptypes@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/typescript-to-proptypes/-/typescript-to-proptypes-1.0.4.tgz#2193a0410a9724a0a61b06a1363daa619f7504ee"
integrity sha512-fnfevgH0o+XaFT43npETojRFQ5Cq4PZu+UB4mBde3vsbYd1P6ZhzvBGrsrLYBA45B5/vIVTvkqFf34UukEHyoA==
dependencies:
"@babel/core" "^7.5.0"
"@babel/plugin-syntax-class-properties" "^7.2.0"
Expand Down

0 comments on commit 6a1a14b

Please sign in to comment.