-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mobile): a basic swipeable dialog for setting
- Loading branch information
Showing
7 changed files
with
320 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 1 addition & 23 deletions
24
packages/frontend/core/src/mobile/dialogs/setting/experimental/styles.css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
packages/frontend/core/src/mobile/dialogs/setting/swipe-dialog.css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { cssVar } from '@toeverything/theme'; | ||
import { bodyEmphasized } from '@toeverything/theme/typography'; | ||
import { cssVarV2 } from '@toeverything/theme/v2'; | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const root = style({ | ||
position: 'fixed', | ||
top: 0, | ||
left: 0, | ||
zIndex: cssVar('zIndexModal'), | ||
width: '100dvw', | ||
height: '100dvh', | ||
}); | ||
export const overlay = style({ | ||
position: 'absolute', | ||
width: '100%', | ||
height: '100%', | ||
left: 0, | ||
top: 0, | ||
background: 'transparent', | ||
}); | ||
export const dialog = style([ | ||
overlay, | ||
{ | ||
padding: 0, | ||
background: cssVarV2('layer/background/mobile/primary'), | ||
// initial state, | ||
transform: 'translateX(100%)', | ||
}, | ||
]); | ||
|
||
export const content = style({ | ||
position: 'relative', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
height: '100dvh', | ||
}); | ||
|
||
export const header = style({ | ||
background: `${cssVarV2('layer/background/mobile/primary')} !important`, | ||
}); | ||
|
||
export const dialogTitle = style([bodyEmphasized, {}]); | ||
export const scrollArea = style({ | ||
height: 0, | ||
flex: 1, | ||
}); | ||
|
||
export const swipeBackTrigger = style({ | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
width: 10, | ||
height: '100%', | ||
zIndex: 1, | ||
}); |
Oops, something went wrong.