mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-07 17:04:58 +01:00
16 lines
No EOL
391 B
JavaScript
16 lines
No EOL
391 B
JavaScript
import React from 'react';
|
|
import cx from 'classnames';
|
|
|
|
export default function Fa({icon, fw, fa, stack, className, ...props}) {
|
|
let faCss = fa ? fa.map(s => 'fa-' + s) : [];
|
|
if (icon) {
|
|
icon = 'fa-' + icon;
|
|
}
|
|
if (fw) {
|
|
faCss.push('fa-fw');
|
|
}
|
|
if (stack) {
|
|
faCss.push('fa-stack-' + stack);
|
|
}
|
|
return <i className={ cx('fa', icon, faCss, className) } {...props}/>
|
|
} |