mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
feat: add import modal
This commit is contained in:
@@ -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,
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user