</div>
)}
- {this.props.showDeprecated && param.deprecatedKey && (
- <div className="little-spacer-top">
- <code>{param.deprecatedKey}</code>
- </div>
- )}
-
- {this.props.showDeprecated && param.deprecatedKey && param.deprecatedKeySince && (
- <div className="little-spacer-top">
- <DeprecatedBadge since={param.deprecatedKeySince} />
- </div>
- )}
-
<div className="note little-spacer-top">{param.required ? 'required' : 'optional'}</div>
{param.since && (
{translateWithParameters('since_x', param.since)}
</div>
)}
+
+ {this.props.showDeprecated && param.deprecatedKey && (
+ <div className="big-spacer-top spacer-left">
+ <div className="note little-spacer-bottom">{translate('replaces')}:</div>
+ <code>{param.deprecatedKey}</code>
+ {param.deprecatedKeySince && (
+ <div className="little-spacer-top">
+ <DeprecatedBadge since={param.deprecatedKeySince} />
+ </div>
+ )}
+ </div>
+ )}
</td>
);
}
it('should render deprecated key', () => {
const params = [
- { ...DEFAULT_PARAM, deprecatedKey: 'foo-deprecated', deprecatedSince: '5.0' },
+ { ...DEFAULT_PARAM, deprecatedKey: 'foo-deprecated', deprecatedKeySince: '5.0' },
{ ...DEFAULT_PARAM, deprecatedSince: '5.0', internal: true }
];
expect(
foo
</code>
<div
- className="little-spacer-top"
+ className="note little-spacer-top"
>
- <DeprecatedBadge
- since="5.0"
- />
+ optional
</div>
<div
- className="little-spacer-top"
+ className="big-spacer-top spacer-left"
>
+ <div
+ className="note little-spacer-bottom"
+ >
+ replaces
+ :
+ </div>
<code>
foo-deprecated
</code>
- </div>
- <div
- className="note little-spacer-top"
- >
- optional
+ <div
+ className="little-spacer-top"
+ >
+ <DeprecatedBadge
+ since="5.0"
+ />
+ </div>
</div>
</td>
<td>