mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-10 17:33:24 +01:00
Optimize starred rendering.
This commit is contained in:
parent
d885f284f2
commit
2d133f33fb
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user