mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
fix(console): set preview desktop background color (#1292)
This commit is contained in:
parent
d456f5c9a2
commit
a1726d58b5
1 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import { Language } from '@logto/phrases';
|
import { Language } from '@logto/phrases';
|
||||||
import { AppearanceMode, ConnectorDTO, ConnectorMetadata, SignInExperience } from '@logto/schemas';
|
import { AppearanceMode, ConnectorDTO, ConnectorMetadata, SignInExperience } from '@logto/schemas';
|
||||||
|
import { conditional } from '@silverhand/essentials';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import React, { useEffect, useMemo, useState, useRef, useCallback } from 'react';
|
import React, { useEffect, useMemo, useState, useRef, useCallback } from 'react';
|
||||||
|
@ -176,6 +177,12 @@ const Preview = ({ signInExperience, className }: Props) => {
|
||||||
</TabNav>
|
</TabNav>
|
||||||
<div
|
<div
|
||||||
className={classNames(styles.body, platform === 'desktopWeb' ? styles.web : styles.mobile)}
|
className={classNames(styles.body, platform === 'desktopWeb' ? styles.web : styles.mobile)}
|
||||||
|
style={conditional(
|
||||||
|
platform === 'desktopWeb' && {
|
||||||
|
// Set background color to match iframe's background color on both dark and light mode.
|
||||||
|
backgroundColor: mode === AppearanceMode.DarkMode ? '#2A2C31' : '#e5e1ec',
|
||||||
|
}
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<div className={styles.deviceWrapper}>
|
<div className={styles.deviceWrapper}>
|
||||||
<div className={classNames(styles.device, styles[mode])}>
|
<div className={classNames(styles.device, styles[mode])}>
|
||||||
|
|
Loading…
Add table
Reference in a new issue