Compare commits
2 Commits
0bccda2c01
...
672e0e7c63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
672e0e7c63 | ||
|
|
d91a8eb341 |
@@ -1,4 +1,4 @@
|
|||||||
import { capitalize, keys } from 'lodash-es';
|
import { capitalize, isArray, keys } from 'lodash-es';
|
||||||
import { FC, ReactNode, useMemo } from 'react';
|
import { FC, ReactNode, useMemo } from 'react';
|
||||||
import { useColorFunction } from '../../../ColorFunctionContext';
|
import { useColorFunction } from '../../../ColorFunctionContext';
|
||||||
import { ScrollArea } from '../../../components/ScrollArea';
|
import { ScrollArea } from '../../../components/ScrollArea';
|
||||||
@@ -127,11 +127,12 @@ const PreviewBlock: FC<PreviewBlockProps> = ({ baseline, title }) => {
|
|||||||
<PreviewLine name="Neutral Variant" unit={baseline.neutralVariant} />
|
<PreviewLine name="Neutral Variant" unit={baseline.neutralVariant} />
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.preview_surface}>
|
<div className={styles.preview_surface}>
|
||||||
{baseline.surface.map((surfaceSet, index) => (
|
{isArray(baseline.surface) &&
|
||||||
<div className={styles.surface_block} key={index}>
|
baseline.surface.map((surfaceSet, index) => (
|
||||||
<PreviewLine key={index} name={`Surface ${index + 1}`} unit={surfaceSet} />
|
<div className={styles.surface_block} key={index}>
|
||||||
</div>
|
<PreviewLine key={index} name={`Surface ${index + 1}`} unit={surfaceSet} />
|
||||||
))}
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.preview_indi_block}>
|
<div className={styles.preview_indi_block}>
|
||||||
<PreviewCell bg={baseline.shadow} fg={baseline.neutralVariant.onRoot}>
|
<PreviewCell bg={baseline.shadow} fg={baseline.neutralVariant.onRoot}>
|
||||||
@@ -140,10 +141,10 @@ const PreviewBlock: FC<PreviewBlockProps> = ({ baseline, title }) => {
|
|||||||
<PreviewCell bg={baseline.overlay} fg={baseline.neutralVariant.onRoot}>
|
<PreviewCell bg={baseline.overlay} fg={baseline.neutralVariant.onRoot}>
|
||||||
Overlay
|
Overlay
|
||||||
</PreviewCell>
|
</PreviewCell>
|
||||||
<PreviewCell bg={baseline.outline} fg={baseline.surface.onRoot}>
|
<PreviewCell bg={baseline.outline} fg={baseline.foreground}>
|
||||||
Outline
|
Outline
|
||||||
</PreviewCell>
|
</PreviewCell>
|
||||||
<PreviewCell bg={baseline.outlineVariant} fg={baseline.surface.onRoot}>
|
<PreviewCell bg={baseline.outlineVariant} fg={baseline.foreground}>
|
||||||
Outline Variant
|
Outline Variant
|
||||||
</PreviewCell>
|
</PreviewCell>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ColorExpand, ColorShifting, SchemeSetting, WACGSetting } from 'color-module';
|
import { ColorExpand, ColorShifting, SchemeSelect, SchemeSetting, WACGSetting } from 'color-module';
|
||||||
import { every, isEmpty, isNil } from 'lodash-es';
|
import { every, isEmpty, isNil } from 'lodash-es';
|
||||||
import { useActionState, useMemo } from 'react';
|
import { useActionState, useMemo } from 'react';
|
||||||
import { useColorFunction } from '../../../ColorFunctionContext';
|
import { useColorFunction } from '../../../ColorFunctionContext';
|
||||||
@@ -53,6 +53,7 @@ export function QSchemeBuilder({ scheme, onBuildCompleted }: QSchemeBuilderProps
|
|||||||
),
|
),
|
||||||
scheme.schemeStorage.source?.setting?.expand_method ?? defaultValues.expand_method,
|
scheme.schemeStorage.source?.setting?.expand_method ?? defaultValues.expand_method,
|
||||||
scheme.schemeStorage.source?.setting?.wacg_follows ?? defaultValues.wacg_follows,
|
scheme.schemeStorage.source?.setting?.wacg_follows ?? defaultValues.wacg_follows,
|
||||||
|
scheme.schemeStorage.source?.setting?.scheme_select ?? defaultValues.scheme_select,
|
||||||
);
|
);
|
||||||
return defaultValues;
|
return defaultValues;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -103,6 +104,7 @@ export function QSchemeBuilder({ scheme, onBuildCompleted }: QSchemeBuilderProps
|
|||||||
),
|
),
|
||||||
Number(formData.get('expanding')) as ColorExpand,
|
Number(formData.get('expanding')) as ColorExpand,
|
||||||
Number(formData.get('wacg')) as WACGSetting,
|
Number(formData.get('wacg')) as WACGSetting,
|
||||||
|
SchemeSelect.Both,
|
||||||
);
|
);
|
||||||
const dumpedSetting = schemeSetting.toJsValue() as QSchemeSetting;
|
const dumpedSetting = schemeSetting.toJsValue() as QSchemeSetting;
|
||||||
return [
|
return [
|
||||||
|
|||||||
Reference in New Issue
Block a user