feat(core): responsive for onboarding (#5361)
fix(core): use light-theme for onboarding back button feat(core): responsive for onboarding
This commit is contained in:
@@ -14,6 +14,9 @@ export const edgelessSwitchWindow = style({
|
|||||||
fontFamily: 'var(--affine-font-family)',
|
fontFamily: 'var(--affine-font-family)',
|
||||||
color: onboardingVars.paper.textColor,
|
color: onboardingVars.paper.textColor,
|
||||||
|
|
||||||
|
maxWidth: 'calc(100vw - 48px)',
|
||||||
|
maxHeight: 'calc(100vh - 48px)',
|
||||||
|
|
||||||
selectors: {
|
selectors: {
|
||||||
'&[data-mode="edgeless"]': {
|
'&[data-mode="edgeless"]': {
|
||||||
width: onboardingVars.edgeless.w,
|
width: onboardingVars.edgeless.w,
|
||||||
|
|||||||
@@ -224,7 +224,15 @@ export const EdgelessSwitch = ({
|
|||||||
|
|
||||||
<div data-no-drag className={styles.noDragWrapper}>
|
<div data-no-drag className={styles.noDragWrapper}>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Button size="extraLarge" onClick={onBack}>
|
<Button
|
||||||
|
style={{
|
||||||
|
background: 'white',
|
||||||
|
borderColor: '#E3E2E4',
|
||||||
|
color: '#424149',
|
||||||
|
}}
|
||||||
|
size="extraLarge"
|
||||||
|
onClick={onBack}
|
||||||
|
>
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
<EdgelessSwitchButtons
|
<EdgelessSwitchButtons
|
||||||
|
|||||||
@@ -133,16 +133,25 @@ export const paperLocation = style({
|
|||||||
export const tipsWrapper = style({
|
export const tipsWrapper = style({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
width: `calc(${onboardingVars.article.w} - 48px)`,
|
width: `calc(${onboardingVars.article.w} - 48px)`,
|
||||||
top: `calc(-${onboardingVars.article.h} / 2 + 24px)`,
|
maxWidth: 'calc(100vw - 96px)',
|
||||||
|
bottom: 0,
|
||||||
|
height: `calc(${onboardingVars.article.h} / 2 - 24px)`,
|
||||||
|
maxHeight: 'calc(50vh - 48px)',
|
||||||
pointerEvents: 'none',
|
pointerEvents: 'none',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
transition: '0.3s ease 1s',
|
transition: '0.3s ease',
|
||||||
selectors: {
|
selectors: {
|
||||||
'&[data-visible="true"]': {
|
'&[data-visible="true"]': {
|
||||||
pointerEvents: 'auto',
|
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
globalStyle(`${tipsWrapper} > *`, {
|
||||||
|
display: 'inline-block',
|
||||||
|
height: 'fit-content',
|
||||||
|
});
|
||||||
|
globalStyle(`${tipsWrapper}[data-visible="true"] > *`, {
|
||||||
|
pointerEvents: 'auto',
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user