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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

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

View File

@ -56,6 +56,10 @@ export const StyledCard = styled('div')<{
borderColor: 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',
right: '6px',
bottom: '6px',
opacity: 0,
pointerEvents: 'none',
transition: 'all .15s',
':hover': {
background: theme.colors.pageBackground,
},