mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-26 13:22:50 -05:00
fixed iconbutton color properties
This commit is contained in:
@@ -19,7 +19,14 @@ const IconButton: React.FC<IconButtonProps> = ({
|
||||
onClick,
|
||||
color,
|
||||
}) => {
|
||||
const { themeColor } = useContext(MyThemeContext)
|
||||
const { themeColorWithShade } = useContext(MyThemeContext)
|
||||
|
||||
const getColor = () => {
|
||||
if (color) return color
|
||||
if (colored) return themeColorWithShade
|
||||
return undefined
|
||||
}
|
||||
|
||||
return (
|
||||
<ChakraIconButton
|
||||
aria-label=""
|
||||
@@ -28,8 +35,7 @@ const IconButton: React.FC<IconButtonProps> = ({
|
||||
variant="ghost"
|
||||
onClick={onClick}
|
||||
size="lg"
|
||||
variantColor={colored ? themeColor : undefined}
|
||||
color={color}
|
||||
color={getColor()}
|
||||
isDisabled={disabled}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user