Remove the need for nested child selectors to workaround emotional (sic) issues (#1646)

This commit is contained in:
Manav Rathi 2024-02-22 09:57:07 +05:30 committed by GitHub
commit d152f08382
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 22 deletions

View file

@ -205,12 +205,16 @@ const Cont = styled('div')<{ disabled: boolean }>`
pointer-events: none;
}
&:hover ${Check} {
opacity: 0.5;
}
&:hover ${HoverOverlay} {
opacity: 1;
&:hover {
input[type='checkbox'] {
opacity: 0.5;
}
.preview-card-hover-overlay {
opacity: 1;
}
}
border-radius: 4px;
`;
@ -342,7 +346,10 @@ export default function PreviewCard(props: IProps) {
</AvatarOverlay>
)}
<HoverOverlay checked={selected} />
<HoverOverlay
className="preview-card-hover-overlay"
checked={selected}
/>
<InSelectRangeOverLay
$active={isRangeSelectActive && isInsSelectRange}
/>

View file

@ -25,22 +25,7 @@ const nextConfig = {
/* generate a static export when we run `next build` */
output: 'export',
compiler: {
emotion: {
importMap: {
'@mui/material': {
styled: {
canonicalImport: ['@emotion/styled', 'default'],
styledBaseImport: ['@mui/material', 'styled'],
},
},
'@mui/material/styles': {
styled: {
canonicalImport: ['@emotion/styled', 'default'],
styledBaseImport: ['@mui/material/styles', 'styled'],
},
},
},
},
emotion: true,
},
transpilePackages: [
'@/utils',