Skip to content

Commit

Permalink
feat(H): deprecate is and style_type properties (#1856)
Browse files Browse the repository at this point in the history
  • Loading branch information
langz authored and tujoworker committed May 31, 2023
1 parent e3c98bc commit ec79d0e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,6 @@ exports[`GlobalError snapshot have to match component snapshot 1`] = `
className={null}
level={null}
size="xx-large"
style_type={null}
top="4"
>
<ForwardRef
Expand Down
10 changes: 0 additions & 10 deletions packages/dnb-eufemia/src/elements/H.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ export default class H extends React.PureComponent {
className: PropTypes.string,
as: PropTypes.string,

/** @deprecated use as instead */
is: PropTypes.string,

level: PropTypes.string,
size: PropTypes.oneOf([
'xx-large',
Expand All @@ -30,15 +27,13 @@ export default class H extends React.PureComponent {
'small',
'x-small',
]),
style_type: PropTypes.string, // deprecated
children: PropTypes.node,
}
static defaultProps = {
className: null,
level: null,
as: 'h1',
size: 'xx-large',
style_type: null, // deprecated
children: null,
}

Expand All @@ -54,16 +49,11 @@ export default class H extends React.PureComponent {
as,
is,
level, // eslint-disable-line
style_type,
size,
className,
...props
} = this.props

if (style_type) {
size = style_type // deprecated
}

return (
<E
as={as || is}
Expand Down

0 comments on commit ec79d0e

Please sign in to comment.