mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 17:41:33 +03:00
interface: sped up sigil implementation
This commit is contained in:
parent
4cec8f481a
commit
643eba1f2a
@ -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>)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user