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})`;
};
const StarredOnStyle = {
color: '#FDDA0D',
};
const StarredOffStyle = {
color: 'gray',
};
const AppBar = ({
model,
mapInfo,
@ -180,9 +188,7 @@ const AppBar = ({
<IconButton size="small" onClick={handleStarredOnClick}>
<StarRateRoundedIcon
color="action"
style={{
color: isStarred ? 'yellow' : 'gray',
}}
style={isStarred ? StarredOnStyle : StarredOffStyle}
/>
</IconButton>
</Tooltip>

1
public
View File

@ -1 +0,0 @@
dist