Compare commits
3 Commits
5a1454e6c2
...
0d9c11b4fb
Author | SHA1 | Date | |
---|---|---|---|
|
0d9c11b4fb | ||
|
d6fba55f3d | ||
|
58be84c499 |
@ -107,7 +107,7 @@ const Q2SchemeMenu: FC<ContextMenuBodyProps> = ({ color, afterClick }) => {
|
||||
const activeSchemeId = useAtomValue(activeSchemeAtom);
|
||||
const updateScheme = useUpdateScheme(activeSchemeId);
|
||||
const updateSchemeContent = useCallback(
|
||||
(content: keyof QSchemeSource) => {
|
||||
(content: keyof Q2SchemeSource) => {
|
||||
updateScheme((prev) => {
|
||||
prev.schemeStorage.source[content] = color;
|
||||
return prev;
|
||||
@ -156,7 +156,7 @@ const Q2SchemeMenu: FC<ContextMenuBodyProps> = ({ color, afterClick }) => {
|
||||
<div className={styles.menu_item} onClick={() => updateSchemeContent('success')}>
|
||||
Set as Success color
|
||||
</div>
|
||||
<div className={styles.menu_item} onClick={() => updateSchemeContent('warning')}>
|
||||
<div className={styles.menu_item} onClick={() => updateSchemeContent('warn')}>
|
||||
Set as Warn color
|
||||
</div>
|
||||
<div className={styles.menu_item} onClick={() => updateSchemeContent('info')}>
|
||||
|
@ -8,6 +8,7 @@ import { ScrollArea } from '../../../components/ScrollArea';
|
||||
import { VSegmentedControl } from '../../../components/VSegmentedControl';
|
||||
import { SchemeContent } from '../../../models';
|
||||
import { Q2SchemeSource, Q2SchemeStorage } from '../../../q-2-scheme';
|
||||
import { QSchemeSetting } from '../../../q-scheme';
|
||||
import { useUpdateScheme } from '../../../stores/schemes';
|
||||
import { isNilOrEmpty, mapToObject } from '../../../utls';
|
||||
import { ColorEntry, IdenticalColorEntry } from '../ColorEntry';
|
||||
|
@ -134,16 +134,16 @@ const PreviewBlock: FC<PreviewBlockProps> = ({ baseline, title }) => {
|
||||
<PreviewLine name="Surface" unit={baseline.surface} />
|
||||
<PreviewLine name="Surface Variant" unit={baseline.surfaceVariant} />
|
||||
<div className={styles.preview_indi_block}>
|
||||
<PreviewCell bg={baseline.shadow} fg={baseline.surface.root.onRoot}>
|
||||
<PreviewCell bg={baseline.shadow} fg={baseline.surface.onRoot}>
|
||||
Shadow
|
||||
</PreviewCell>
|
||||
<PreviewCell bg={baseline.overlay} fg={baseline.surface.root.onRoot}>
|
||||
<PreviewCell bg={baseline.overlay} fg={baseline.surface.onRoot}>
|
||||
Overlay
|
||||
</PreviewCell>
|
||||
<PreviewCell bg={baseline.outline} fg={baseline.surface.root.onRoot}>
|
||||
<PreviewCell bg={baseline.outline} fg={baseline.surface.onRoot}>
|
||||
Outline
|
||||
</PreviewCell>
|
||||
<PreviewCell bg={baseline.outlineVariant} fg={baseline.surface.root.onRoot}>
|
||||
<PreviewCell bg={baseline.outlineVariant} fg={baseline.surface.onRoot}>
|
||||
Outline Variant
|
||||
</PreviewCell>
|
||||
</div>
|
||||
|
@ -18,7 +18,7 @@ import { M3Scheme } from '../page-components/scheme/M3Scheme';
|
||||
import { Q2Scheme } from '../page-components/scheme/Q2Scheme';
|
||||
import { QScheme } from '../page-components/scheme/QScheme';
|
||||
import { SwatchScheme } from '../page-components/scheme/SwatchScheme';
|
||||
import { Q2SchemeSource } from '../q-2-scheme';
|
||||
import { Q2SchemeStorage } from '../q-2-scheme';
|
||||
import { QSchemeStorage } from '../q-scheme';
|
||||
import { useScheme, useUpdateScheme } from '../stores/schemes';
|
||||
import { SwatchSchemeStorage } from '../swatch_scheme';
|
||||
@ -53,7 +53,7 @@ export function SchemeDetail() {
|
||||
case 'q_scheme':
|
||||
return <QScheme scheme={scheme as SchemeContent<QSchemeStorage>} />;
|
||||
case 'q_2_scheme':
|
||||
return <Q2Scheme scheme={scheme as SchemeContent<Q2SchemeSource>} />;
|
||||
return <Q2Scheme scheme={scheme as SchemeContent<Q2SchemeStorage>} />;
|
||||
case 'swatch_scheme':
|
||||
return <SwatchScheme scheme={scheme as SchemeContent<SwatchSchemeStorage>} />;
|
||||
case 'material_2':
|
||||
|
@ -21,10 +21,10 @@ export type Q2Baseline = {
|
||||
secondary: Q2ColorUnit | null;
|
||||
tertiary: Q2ColorUnit | null;
|
||||
accent: Q2ColorUnit | null;
|
||||
neutral: Q2ColorUnit;
|
||||
neutralVariant: Q2ColorUnit;
|
||||
surface: Q2ColorUnit;
|
||||
surfaceVariant: Q2ColorUnit;
|
||||
neutral: Q2ColorSet;
|
||||
neutralVariant: Q2ColorSet;
|
||||
surface: Q2ColorSet;
|
||||
surfaceVariant: Q2ColorSet;
|
||||
neutralSwatch: Record<string, string>;
|
||||
danger: Q2ColorUnit;
|
||||
success: Q2ColorUnit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user