调整Scheme支持M3动态Scheme标识。

This commit is contained in:
徐涛 2025-02-13 14:35:33 +08:00
parent 715459eef0
commit cd2d724b52
3 changed files with 13 additions and 1 deletions

View File

@ -17,5 +17,9 @@
background-color: #a78fff; background-color: #a78fff;
color: var(--color-qihei); color: var(--color-qihei);
} }
&.m3d {
background-color: #ffde3f;
color: var(--color-qihei);
}
} }
} }

View File

@ -22,6 +22,8 @@ export function SchemeSign({ scheme, short = false }: SchemeSignProps) {
return styles.m2; return styles.m2;
case 'material_3': case 'material_3':
return styles.m3; return styles.m3;
case 'material_3_dynamic':
return styles.m3d;
} }
}, [scheme]); }, [scheme]);

View File

@ -29,7 +29,12 @@ export type ColorDescription = {
oklch: [number, number, number]; oklch: [number, number, number];
}; };
export type SchemeType = 'q_scheme' | 'swatch_scheme' | 'material_2' | 'material_3'; export type SchemeType =
| 'q_scheme'
| 'swatch_scheme'
| 'material_2'
| 'material_3'
| 'material_3_dynamic';
export type SchemeTypeOption = { export type SchemeTypeOption = {
label: string; label: string;
short: string; short: string;
@ -40,6 +45,7 @@ export const SchemeTypeOptions: SchemeTypeOption[] = [
{ label: 'Swatch Scheme', short: 'Swatch', value: 'swatch_scheme' }, { label: 'Swatch Scheme', short: 'Swatch', value: 'swatch_scheme' },
{ label: 'Material Design 2 Scheme', short: 'M2', value: 'material_2' }, { label: 'Material Design 2 Scheme', short: 'M2', value: 'material_2' },
{ label: 'Material Design 3 Scheme', short: 'M3', value: 'material_3' }, { label: 'Material Design 3 Scheme', short: 'M3', value: 'material_3' },
{ label: 'Material Design 3 Dynamic Scheme', short: 'M3D', value: 'material_3_dynamic' },
]; ];
export function schemeType( export function schemeType(