mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(ui): fix preview classname overwrite bug (#4038)
fix(ui): fix preview mode user can interact bug fix preview mode user can interact bug
This commit is contained in:
parent
bf0f3e133e
commit
c743cef429
2 changed files with 9 additions and 0 deletions
7
.changeset/six-starfishes-hide.md
Normal file
7
.changeset/six-starfishes-hide.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
"@logto/ui": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Bug fix main flow preview mode should not allow user interaction.
|
||||||
|
|
||||||
|
- Recover the missing preview classname from the preview mode body element
|
|
@ -38,6 +38,8 @@ const AppMeta = () => {
|
||||||
{experienceSettings?.customCss && <style>{experienceSettings.customCss}</style>}
|
{experienceSettings?.customCss && <style>{experienceSettings.customCss}</style>}
|
||||||
<body
|
<body
|
||||||
className={classNames(
|
className={classNames(
|
||||||
|
// Should preserve any existing classNames
|
||||||
|
conditionalString(document.body.className),
|
||||||
platform === 'mobile' ? 'mobile' : 'desktop',
|
platform === 'mobile' ? 'mobile' : 'desktop',
|
||||||
conditionalString(styles[theme])
|
conditionalString(styles[theme])
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue