Skip to content

Commit

Permalink
revert image input
Browse files Browse the repository at this point in the history
  • Loading branch information
Tricks1228 committed Feb 12, 2025
1 parent f9abe0c commit 0e6c9d5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 56 deletions.
8 changes: 1 addition & 7 deletions src/components/inputs/BaseInputProps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod';

export const inputTypeSchema = z
.enum(['text', 'number', 'boolean', 'range', 'select', 'counter', 'timer', 'image'])
.enum(['text', 'number', 'boolean', 'range', 'select', 'counter', 'timer'])
.describe('The type of input');

export const inputBaseSchema = z.object({
Expand Down Expand Up @@ -71,10 +71,6 @@ export const timerInputSchema = inputBaseSchema.extend({
defaultValue: z.number().default(0).describe('The default value'),
});

export const imageInputSchema = inputBaseSchema.extend({
type: z.literal('image'),
defaultValue: z.tuple([z.number(), z.number()]).default([0, 0]).describe('The default value')
});

export const sectionSchema = z.object({
name: z.string(),
Expand Down Expand Up @@ -211,7 +207,6 @@ export type CounterInputData = z.infer<typeof counterInputSchema>;
export type RangeInputData = z.infer<typeof rangeInputSchema>;
export type BooleanInputData = z.infer<typeof booleanInputSchema>;
export type TimerInputData = z.infer<typeof timerInputSchema>;
export type ImageInputData = z.infer<typeof imageInputSchema>;

export type InputPropsMap = {
text: StringInputData;
Expand All @@ -221,7 +216,6 @@ export type InputPropsMap = {
select: SelectInputData;
counter: CounterInputData;
timer: TimerInputData;
iamge: ImageInputData;
};

export type SectionProps = z.infer<typeof sectionSchema>;
Expand Down
49 changes: 0 additions & 49 deletions src/components/inputs/ImageInput.tsx

This file was deleted.

0 comments on commit 0e6c9d5

Please sign in to comment.