interface: sped up sigil implementation

This commit is contained in:
Tyler Brown Cifu Shuster 2020-08-23 20:10:03 -07:00
parent 4cec8f481a
commit 643eba1f2a

View File

@ -13,7 +13,7 @@ export const foregroundFromBackground = (background) => {
return ((whiteBrightness - brightness) < 50) ? 'black' : 'white'; return ((whiteBrightness - brightness) < 50) ? 'black' : 'white';
} }
export const Sigil = memo(({ classes = '', color, ship, size }) => { export const Sigil = memo(({ classes = '', color, ship, size, svgClass = '' }) => {
return ship.length > 14 return ship.length > 14
? (<div ? (<div
className={'bg-black dib ' + classes} className={'bg-black dib ' + classes}
@ -31,7 +31,7 @@ export const Sigil = memo(({ classes = '', color, ship, size }) => {
color, color,
foregroundFromBackground(color) foregroundFromBackground(color)
], ],
class: classes class: svgClass
})} })}
</div>) </div>)
}) })