misc: Cleanup

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
Florian Bouillon 2022-04-05 11:53:00 +02:00
parent b5f44113b5
commit aa4e7100fe
Signed by: Florian Bouillon
GPG Key ID: BEEAF3722D0EBF64
2 changed files with 5 additions and 2 deletions

View File

@ -11,6 +11,9 @@ interface Props {
export default class Container extends React.Component<Props> { export default class Container extends React.Component<Props> {
public render = () => React.createElement(this.props.mainContainer ? 'main' : 'div', {className: buildClassName(css.container, this.props.className, [css.main, this.props.mainContainer]), children: this.props.children}) public render = () => React.createElement(this.props.mainContainer ? 'main' : 'div', {
className: buildClassName(css.container, this.props.className, [css.main, this.props.mainContainer]),
children: this.props.children
})
} }

View File

@ -85,7 +85,7 @@ export default class Text extends React.PureComponent<Props> {
) )
if (this.props.tag === 'em') { if (this.props.tag === 'em') {
return (<p className={classes}><em>{this.props.children}</em></p>) return <p className={classes}><em>{this.props.children}</em></p>
} }
return React.createElement(this.props.tag ?? data.tag ?? 'p', {...this.props.textProps, className: classes, children: this.props.children}) return React.createElement(this.props.tag ?? data.tag ?? 'p', {...this.props.textProps, className: classes, children: this.props.children})