chore: update react 18 (#520)

* chore: update to react 18 and related dependencies
This commit is contained in:
Dan Ribbens
2022-04-12 11:26:55 -04:00
committed by GitHub
parent 6b06fe4481
commit a4f2c5abd4
19 changed files with 65 additions and 49 deletions

View File

@@ -4,7 +4,7 @@ import { useWindowInfo } from '@faceless-ui/window-info';
const context = createContext(false);
const { Provider } = context;
export const NegativeFieldGutterProvider: React.FC<{allow?: boolean}> = ({ children, allow }) => {
export const NegativeFieldGutterProvider: React.FC<{allow?: boolean, children?: React.ReactNode}> = ({ children, allow }) => {
const { breakpoints: { m: midBreak } } = useWindowInfo();
return (

View File

@@ -1,3 +1,4 @@
import React from 'react';
import { DraggableProvidedDragHandleProps } from 'react-beautiful-dnd';
export type Props = {
@@ -5,4 +6,5 @@ export type Props = {
verticalAlignment?: 'top' | 'center' | 'sticky'
dragHandleProps?: DraggableProvidedDragHandleProps
className?: string
children?: React.ReactNode
}

View File

@@ -1,3 +1,4 @@
import React from 'react';
import { Field as FieldConfig, Condition, Validate } from '../../../../fields/config/types';
export type Field = {
@@ -39,6 +40,7 @@ export type Props = {
waitForAutocomplete?: boolean
log?: boolean
validationOperation?: 'create' | 'update'
children?: React.ReactNode
}
export type SubmitOptions = {

View File

@@ -3,7 +3,6 @@ import isHotkey from 'is-hotkey';
import { createEditor, Transforms, Node, Element as SlateElement, Text, BaseEditor } from 'slate';
import { ReactEditor, Editable, withReact, Slate } from 'slate-react';
import { HistoryEditor, withHistory } from 'slate-history';
import { options } from 'joi';
import { richText } from '../../../../../fields/validations';
import useField from '../../useField';
import withCondition from '../../withCondition';

View File

@@ -2,4 +2,5 @@ export type ButtonProps = {
format: string
onClick?: (e: React.MouseEvent) => void
className?: string
children?: React.ReactNode
}