mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: recover embed code
This commit is contained in:
1 parent
cee082ab67
commit
9daab37ba1
16 files changed
+746
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { TextField } from '@radix-ui/themes';
|
||||
import type { EmbedPreviewControllerProps } from '../../pages/tools/embed/[embed]/_index';
|
||||
import { EmbedState } from '../../stores/embedState';
|
||||
|
||||
export function TextController({ configKey }: EmbedPreviewControllerProps) {
|
||||
const mutateEmbedState = EmbedState.useMutation();
|
||||
|
||||
return (
|
||||
<TextField.Root
|
||||
placeholder="Empty"
|
||||
value={EmbedState.use((state) => state[configKey] as string)}
|
||||
onChange={(event) => {
|
||||
mutateEmbedState((draft) => {
|
||||
draft[configKey] = event.target.value;
|
||||
});
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user