Environment colors (#225)

This commit is contained in:
Gregory Schier authored and GitHub committed 2025-06-07 18:21:54 -07:00
1 parent 27901231dc
commit d0fde99b1c
19 files changed
+182 -25

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import type { Environment } from '@yaakapp-internal/models';
import { patchModel } from '@yaakapp-internal/models';
import { showDialog } from './dialog';
import { EnvironmentColorPicker } from '../components/EnvironmentColorPicker';
export function showColorPicker(environment: Environment) {
showDialog({
title: 'Environment Color',
id: 'color-picker',
size: 'dynamic',
render: ({ hide }) => {
return (
<EnvironmentColorPicker
color={environment.color ?? '#54dc44'}
onChange={async (color) => {
await patchModel(environment, { color });
hide();
}}
/>
);
},
});
}