Merge pull request #183 from toeverything/fix/style

fix: style ui
This commit is contained in:
DiamondThree 2022-08-10 18:44:30 +08:00 committed by GitHub
commit 696a7785e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 8 deletions

View File

@ -38,6 +38,7 @@ const GroupActionWrapper = styled('div')(({ theme }) => ({
visibility: 'hidden', visibility: 'hidden',
fontSize: theme.affine.typography.xs.fontSize, fontSize: theme.affine.typography.xs.fontSize,
color: theme.affine.palette.icons, color: theme.affine.palette.icons,
opacity: 0.6,
'.line': { '.line': {
flex: 1, flex: 1,
height: '15px', height: '15px',

View File

@ -109,12 +109,15 @@ export const PageView: FC<CreateView> = ({ block, editor }) => {
); );
}; };
const PageTitleBlock = styled('div')({ const PageTitleBlock = styled('div')(({ theme }) => {
'.title': { return {
fontSize: Theme.typography.page.fontSize, '.title': {
lineHeight: Theme.typography.page.lineHeight, fontSize: theme.affine.typography.page.fontSize,
}, lineHeight: theme.affine.typography.page.lineHeight,
'.content': { fontWeight: theme.affine.typography.page.fontWeight,
outline: 'none', },
}, '.content': {
outline: 'none',
},
};
}); });

View File

@ -46,6 +46,7 @@ const TextBlock = styled(TextManage)<{ type: string }>(({ theme, type }) => {
return { return {
fontSize: textStyleMap.text.fontSize, fontSize: textStyleMap.text.fontSize,
lineHeight: textStyleMap.text.lineHeight, lineHeight: textStyleMap.text.lineHeight,
fontWeight: textStyleMap.text.fontWeight,
}; };
} }
}); });

View File

@ -150,6 +150,7 @@ const TodoBlock = styled('div')({
display: 'flex', display: 'flex',
'.checkBoxContainer': { '.checkBoxContainer': {
marginRight: '4px', marginRight: '4px',
padding: '0 4px',
height: '22px', height: '22px',
}, },
'.textContainer': { '.textContainer': {

View File

@ -39,6 +39,9 @@ export type ExtendedTextUtils = SlateUtils & {
}; };
const TextBlockContainer = styled(Text)(({ theme }) => ({ const TextBlockContainer = styled(Text)(({ theme }) => ({
lineHeight: theme.affine.typography.body1.lineHeight, lineHeight: theme.affine.typography.body1.lineHeight,
fontFamily: theme.affine.typography.body1.fontFamily,
color: theme.affine.typography.body1.color,
letterSpacing: '0.1px',
})); }));
const findSlice = (arr: string[], p: string, q: string) => { const findSlice = (arr: string[], p: string, q: string) => {

View File

@ -173,26 +173,34 @@ export const Theme = {
body1: { body1: {
fontSize: '16px', fontSize: '16px',
lineHeight: '22px', lineHeight: '22px',
fontWeight: 400,
fontFamily: 'PingFang SC',
color: '#3A4C5C',
}, },
h1: { h1: {
fontSize: '28px', fontSize: '28px',
lineHeight: '40px', lineHeight: '40px',
fontWeight: 600,
}, },
h2: { h2: {
fontSize: '24px', fontSize: '24px',
lineHeight: '34px', lineHeight: '34px',
fontWeight: 600,
}, },
h3: { h3: {
fontSize: '20px', fontSize: '20px',
lineHeight: '28px', lineHeight: '28px',
fontWeight: 600,
}, },
h4: { h4: {
fontSize: '16px', fontSize: '16px',
lineHeight: '22px', lineHeight: '22px',
fontWeight: 600,
}, },
page: { page: {
fontSize: '36px', fontSize: '36px',
lineHeight: '44px', lineHeight: '44px',
fontWeight: 600,
}, },
callout: { callout: {
fontSize: '36px', fontSize: '36px',
@ -221,6 +229,7 @@ export const Theme = {
articleTitle: { articleTitle: {
fontSize: '36px', fontSize: '36px',
lineHeight: '54px', lineHeight: '54px',
fontWeight: 600,
}, },
}, },
shadows: { shadows: {