WIP <Compose> Refactor; SCSS ed.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import classNames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
@@ -5,13 +7,19 @@ export default class DisplayName extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: ImmutablePropTypes.map.isRequired,
|
||||
className: PropTypes.string,
|
||||
};
|
||||
|
||||
render () {
|
||||
const displayNameHtml = { __html: this.props.account.get('display_name_html') };
|
||||
const {
|
||||
account,
|
||||
className,
|
||||
} = this.props;
|
||||
const computedClass = classNames('display-name', className);
|
||||
const displayNameHtml = { __html: account.get('display_name_html') };
|
||||
|
||||
return (
|
||||
<span className='display-name'>
|
||||
<span className={computedClass}>
|
||||
<strong className='display-name__html' dangerouslySetInnerHTML={displayNameHtml} /> <span className='display-name__account'>@{this.props.account.get('acct')}</span>
|
||||
</span>
|
||||
);
|
||||
|
Reference in New Issue
Block a user