Optimize starred rendering.

This commit is contained in:
Paulo Gustavo Veiga 2022-11-12 19:49:24 -08:00
parent d885f284f2
commit 2d133f33fb
2 changed files with 9 additions and 4 deletions

View File

@ -59,6 +59,14 @@ const keyTooltip = (msg: string, key: string): string => {
return `${msg} (${isMac ? '⌘' : 'Ctrl'} + ${key})`; return `${msg} (${isMac ? '⌘' : 'Ctrl'} + ${key})`;
}; };
const StarredOnStyle = {
color: '#FDDA0D',
};
const StarredOffStyle = {
color: 'gray',
};
const AppBar = ({ const AppBar = ({
model, model,
mapInfo, mapInfo,
@ -180,9 +188,7 @@ const AppBar = ({
<IconButton size="small" onClick={handleStarredOnClick}> <IconButton size="small" onClick={handleStarredOnClick}>
<StarRateRoundedIcon <StarRateRoundedIcon
color="action" color="action"
style={{ style={isStarred ? StarredOnStyle : StarredOffStyle}
color: isStarred ? 'yellow' : 'gray',
}}
/> />
</IconButton> </IconButton>
</Tooltip> </Tooltip>

1
public
View File

@ -1 +0,0 @@
dist