fix: setting entry only show when hover on workspace card (#1515)

This commit is contained in:
Qi
2023-03-10 18:07:30 +08:00
committed by GitHub
parent a3ed8f6774
commit 9043081b8d
2 changed files with 8 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ export const WorkspaceCard: React.FC<WorkspaceCardProps> = ({
)} )}
</StyleWorkspaceInfo> </StyleWorkspaceInfo>
<StyledSettingLink <StyledSettingLink
className="setting-entry"
hoverBackground="#fff" hoverBackground="#fff"
onClick={e => { onClick={e => {
e.stopPropagation(); e.stopPropagation();

View File

@@ -56,6 +56,10 @@ export const StyledCard = styled('div')<{
borderColor: theme.colors.primaryColor, borderColor: theme.colors.primaryColor,
color: theme.colors.primaryColor, color: theme.colors.primaryColor,
}, },
'.setting-entry': {
opacity: 1,
pointerEvents: 'auto',
},
}, },
}; };
}); });
@@ -78,6 +82,9 @@ export const StyledSettingLink = styled(IconButton)(({ theme }) => {
position: 'absolute', position: 'absolute',
right: '6px', right: '6px',
bottom: '6px', bottom: '6px',
opacity: 0,
pointerEvents: 'none',
transition: 'all .15s',
':hover': { ':hover': {
background: theme.colors.pageBackground, background: theme.colors.pageBackground,
}, },