lbry-desktop/ui/component/common/lbc-symbol.jsx
2020-09-29 17:12:32 -04:00

35 lines
749 B
JavaScript

// @flow
import * as ICONS from 'constants/icons';
import React from 'react';
import classnames from 'classnames';
import Icon from 'component/common/icon';
type Props = {
withText?: boolean,
isTitle?: boolean,
size?: number,
prefix?: string | number,
postfix?: string | number,
};
const LbcSymbol = (props: Props) => {
const { prefix, postfix, size, isTitle = false } = props;
return (
<>
{prefix}
<Icon
icon={ICONS.LBC}
size={isTitle ? 22 : size}
className={classnames('icon__lbc', {
'icon__lbc--before-text': prefix,
'icon__lbc--after-text': postfix,
'icon__lbc--title': isTitle,
})}
/>
{postfix}
</>
);
};
export default LbcSymbol;