Skip to content

Commit

Permalink
Chore/update deprecation notices (#127)
Browse files Browse the repository at this point in the history
* Update SPACING constant deprecation notices

* Update Button deprecation notices

* Make SPACING language consistent with Button language
  • Loading branch information
michaeljaltamirano committed Jun 28, 2019
1 parent 0f0cf0b commit 2488f79
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/constants/spacing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ const SPACING = {

const deprecatedProperties = {
xxsmall:
'SPACING.xxsmall is deprecated and will be removed in v3. Use SPACER.xsmall instead',
'SPACING.xxsmall is deprecated and will be removed in a future major release. Use SPACER.xsmall instead',
xsmall:
'SPACING.xsmall is deprecated and will be removed in v3. Use SPACER.small instead',
'SPACING.xsmall is deprecated and will be removed in a future major release. Use SPACER.small instead',
small:
'SPACING.small is deprecated and will be removed in v3. Use SPACER.medium instead',
'SPACING.small is deprecated and will be removed in a future major release. Use SPACER.medium instead',
base:
'SPACING.base is deprecated and will be removed in v3. Use SPACER.large instead',
'SPACING.base is deprecated and will be removed in a future major release. Use SPACER.large instead',
medium:
'SPACING.medium is deprecated and will be removed in v3. Use SPACER.xlarge instead',
'SPACING.medium is deprecated and will be removed in a future major release. Use SPACER.xlarge instead',
large:
'SPACING.large is deprecated and will be removed in v3. Use SPACER.x2large instead',
'SPACING.large is deprecated and will be removed in a future major release. Use SPACER.x2large instead',
xlarge:
'SPACING.xlarge is deprecated and will be removed in v3. Use SPACER.x4large instead',
'SPACING.xlarge is deprecated and will be removed in a future major release. Use SPACER.x4large instead',
xxlarge:
'SPACING.xxlarge is deprecated and will be removed in v3. Use SPACER.x5large instead',
'SPACING.xxlarge is deprecated and will be removed in a future major release. Use SPACER.x5large instead',
};

export default withDeprecationWarning(SPACING, deprecatedProperties);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const deprecatedProperties = {
const isLoadingPropFunction = (props, propName, componentName) => {
if (props[propName] !== undefined) {
return new Error(
`'loading' prop will be deprecated in the next major release. Please rename 'loading' to 'isLoading' in ${componentName}`
`'loading' prop will be deprecated in a future major release. Please rename 'loading' to 'isLoading' in ${componentName}`
);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/shared-components/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const deprecatedProperties = {
const isLoadingPropFunction = (props, propName, componentName) => {
if (props[propName] !== undefined) {
return new Error(
`'loading' prop will be deprecated in the next major release. Please rename 'loading' to 'isLoading' in ${componentName}`
`'loading' prop will be deprecated in a future major release. Please rename 'loading' to 'isLoading' in ${componentName}`
);
}
};
Expand Down

0 comments on commit 2488f79

Please sign in to comment.