feat: add import modal

This commit is contained in:
QiShaoXuan
2022-12-09 22:00:16 +08:00
parent 9ba50ee1c4
commit 0abd68d721
9 changed files with 188 additions and 116 deletions
+1 -45
View File
@@ -1,5 +1,4 @@
import { displayFlex, styled, AffineTheme } from '@/styles';
import { ConfirmProps } from '@/ui/confirm/confirm';
import { displayFlex, styled } from '@/styles';
import { ModalWrapper } from '@/ui/modal';
export const StyledModalWrapper = styled(ModalWrapper)(({ theme }) => {
@@ -7,8 +6,6 @@ export const StyledModalWrapper = styled(ModalWrapper)(({ theme }) => {
width: '460px',
height: '240px',
padding: '0 60px',
background: theme.colors.popoverBackground,
position: 'relative',
};
});
@@ -37,44 +34,3 @@ export const StyledButtonWrapper = styled.div(() => {
marginTop: '32px',
};
});
const getButtonColors = (
theme: AffineTheme,
confirmType: ConfirmProps['confirmType']
) => {
switch (confirmType) {
case 'primary':
return {
background: theme.colors.primaryColor,
color: '#fff',
borderColor: theme.colors.primaryColor,
};
case 'warning':
return {
background: theme.colors.warningBackground,
color: theme.colors.warningColor,
borderColor: theme.colors.warningBackground,
':hover': {
borderColor: theme.colors.warningColor,
},
};
case 'danger':
return {
background: theme.colors.errorBackground,
color: theme.colors.errorColor,
borderColor: theme.colors.errorBackground,
':hover': {
borderColor: theme.colors.errorColor,
},
};
default:
return {
color: theme.colors.popoverColor,
borderColor: theme.colors.borderColor,
':hover': {
borderColor: theme.colors.primaryColor,
color: theme.colors.primaryColor,
},
};
}
};