mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-20 04:14:12 +01:00
migrated embed
This commit is contained in:
98 files changed
+1979
-1376
No files matched your search
@@ -1,19 +1,17 @@
|
||||
import { Slider } from "@radix-ui/themes";
|
||||
import type { EmbedPreviewControllerProps } from "../../pages/[...chunk_default]/[...locale]/embed/[embed]/_index";
|
||||
import { EmbedState, type RadixSizeWithout0 } from "../../stores/embedState";
|
||||
import { EmbedState } from "../../stores/embedState";
|
||||
import type { SpaceWithout0 } from "../../types/styles";
|
||||
import { RangeSlider } from "./RangeSlider";
|
||||
|
||||
export function SizeWithout0({ configKey }: EmbedPreviewControllerProps) {
|
||||
return (
|
||||
<Slider
|
||||
variant="classic"
|
||||
<RangeSlider
|
||||
min={1}
|
||||
max={9}
|
||||
value={[
|
||||
EmbedState.use((state) =>
|
||||
parseInt(state[configKey] as RadixSizeWithout0),
|
||||
),
|
||||
]}
|
||||
onValueChange={([value]) => {
|
||||
value={EmbedState.use((state) =>
|
||||
parseInt(state[configKey] as SpaceWithout0),
|
||||
)}
|
||||
onValueChange={(value) => {
|
||||
EmbedState.mutate((draft) => {
|
||||
draft[configKey] = `${value}`;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user