refactor: update type

This commit is contained in:
cv
2023-09-29 21:12:01 +02:00
parent cf7f6bdbf7
commit e5e5798272
2 changed files with 6 additions and 7 deletions
@@ -1,6 +1,6 @@
import { useCallback } from 'react'; import { useCallback } from 'react';
import { TitleActions } from '../../../../features/event-editor/composite/EventEditorDataLeft'; import { EditorUpdateFields } from '../../../../features/event-editor/EventEditor';
import Swatch from './Swatch'; import Swatch from './Swatch';
@@ -8,8 +8,8 @@ import style from './SwatchSelect.module.scss';
interface ColourInputProps { interface ColourInputProps {
value: string; value: string;
name: TitleActions; name: EditorUpdateFields;
handleChange: (newValue: TitleActions, name: string) => void; handleChange: (newValue: EditorUpdateFields, name: string) => void;
} }
const colours = [ const colours = [
@@ -2,16 +2,15 @@ import { useCallback } from 'react';
import { Textarea } from '@chakra-ui/react'; import { Textarea } from '@chakra-ui/react';
import useReactiveTextInput from '../../../common/components/input/text-input/useReactiveTextInput'; import useReactiveTextInput from '../../../common/components/input/text-input/useReactiveTextInput';
import { EditorUpdateFields } from '../EventEditor';
import { TitleActions } from './EventEditorDataLeft';
import style from '../EventEditor.module.scss'; import style from '../EventEditor.module.scss';
interface CountedTextAreaProps { interface CountedTextAreaProps {
field: TitleActions; field: EditorUpdateFields;
label: string; label: string;
initialValue: string; initialValue: string;
submitHandler: (field: TitleActions, value: string) => void; submitHandler: (field: EditorUpdateFields, value: string) => void;
} }
export default function CountedTextArea(props: CountedTextAreaProps) { export default function CountedTextArea(props: CountedTextAreaProps) {