chore: enable no-unused vars (#2181)

This commit is contained in:
Himself65
2023-04-28 00:41:06 -05:00
committed by GitHub
parent b6ca2aa063
commit 70fbbb39c1
70 changed files with 206 additions and 225 deletions

View File

@@ -1,6 +1,6 @@
import { styled, TextButton } from '@affine/component';
export const StyledModalWrapper = styled('div')(({ theme }) => {
export const StyledModalWrapper = styled('div')(() => {
return {
position: 'relative',
padding: '0px',
@@ -11,7 +11,7 @@ export const StyledModalWrapper = styled('div')(({ theme }) => {
};
});
export const StyledModalHeader = styled('div')(({ theme }) => {
export const StyledModalHeader = styled('div')(() => {
return {
margin: '44px 0px 12px 0px',
width: '560px',
@@ -21,7 +21,7 @@ export const StyledModalHeader = styled('div')(({ theme }) => {
};
});
export const StyledTextContent = styled('div')(({ theme }) => {
export const StyledTextContent = styled('div')(() => {
return {
margin: 'auto',
width: '560px',
@@ -40,7 +40,7 @@ export const StyledButtonContent = styled('div')(() => {
justifyContent: 'center',
};
});
export const StyledButton = styled(TextButton)(({ theme }) => {
export const StyledButton = styled(TextButton)(() => {
return {
color: 'var(--affine-primary-color)',
height: '32px',
@@ -50,7 +50,7 @@ export const StyledButton = styled(TextButton)(({ theme }) => {
padding: '4px 20px',
};
});
export const StyledDangerButton = styled(TextButton)(({ theme }) => {
export const StyledDangerButton = styled(TextButton)(() => {
return {
color: '#FF631F',
height: '32px',

View File

@@ -2,7 +2,7 @@ import { Button, displayFlex, styled, TextButton } from '../..';
export const StyledShareButton = styled(TextButton, {
shouldForwardProp: (prop: string) => prop !== 'isShared',
})<{ isShared?: boolean }>(({ theme, isShared }) => {
})<{ isShared?: boolean }>(({ isShared }) => {
return {
padding: '4px 8px',
marginLeft: '4px',
@@ -30,55 +30,53 @@ export const StyledTabsWrapper = styled('div')(() => {
};
});
export const TabItem = styled('li')<{ isActive?: boolean }>(
({ theme, isActive }) => {
{
return {
...displayFlex('center', 'center'),
flex: '1',
height: '30px',
color: 'var(--affine-text-primary-color)',
opacity: isActive ? 1 : 0.2,
fontWeight: '500',
fontSize: 'var(--affine-font-base)',
lineHeight: 'var(--affine-line-height)',
cursor: 'pointer',
transition: 'all 0.15s ease',
padding: '0 10px',
marginBottom: '4px',
borderRadius: '4px',
position: 'relative',
':hover': {
background: 'var(--affine-hover-color)',
opacity: 1,
color: isActive
export const TabItem = styled('li')<{ isActive?: boolean }>(({ isActive }) => {
{
return {
...displayFlex('center', 'center'),
flex: '1',
height: '30px',
color: 'var(--affine-text-primary-color)',
opacity: isActive ? 1 : 0.2,
fontWeight: '500',
fontSize: 'var(--affine-font-base)',
lineHeight: 'var(--affine-line-height)',
cursor: 'pointer',
transition: 'all 0.15s ease',
padding: '0 10px',
marginBottom: '4px',
borderRadius: '4px',
position: 'relative',
':hover': {
background: 'var(--affine-hover-color)',
opacity: 1,
color: isActive
? 'var(--affine-text-primary-color)'
: 'var(--affine-text-secondary-color)',
svg: {
fill: isActive
? 'var(--affine-text-primary-color)'
: 'var(--affine-text-secondary-color)',
svg: {
fill: isActive
? 'var(--affine-text-primary-color)'
: 'var(--affine-text-secondary-color)',
},
},
svg: {
fontSize: '20px',
marginRight: '12px',
},
':after': {
content: '""',
position: 'absolute',
bottom: '-6px',
left: '0',
width: '100%',
height: '2px',
background: 'var(--affine-text-primary-color)',
opacity: 0.2,
},
};
}
},
svg: {
fontSize: '20px',
marginRight: '12px',
},
':after': {
content: '""',
position: 'absolute',
bottom: '-6px',
left: '0',
width: '100%',
height: '2px',
background: 'var(--affine-text-primary-color)',
opacity: 0.2,
},
};
}
);
export const StyledIndicator = styled('div')(({ theme }) => {
});
export const StyledIndicator = styled('div')(() => {
return {
height: '2px',
background: 'var(--affine-text-primary-color)',
@@ -87,7 +85,7 @@ export const StyledIndicator = styled('div')(({ theme }) => {
transition: 'left .3s, width .3s',
};
});
export const StyledInput = styled('input')(({ theme }) => {
export const StyledInput = styled('input')(() => {
return {
padding: '4px 8px',
height: '28px',
@@ -101,7 +99,7 @@ export const StyledInput = styled('input')(({ theme }) => {
marginRight: '10px',
};
});
export const StyledButton = styled(TextButton)(({ theme }) => {
export const StyledButton = styled(TextButton)(() => {
return {
color: 'var(--affine-primary-color)',
height: '32px',
@@ -121,7 +119,7 @@ export const StyledDisableButton = styled(Button)(() => {
padding: '0',
};
});
export const StyledLinkSpan = styled('span')(({ theme }) => {
export const StyledLinkSpan = styled('span')(() => {
return {
marginLeft: '4px',
color: 'var(--affine-primary-color)',