fix: Drag and drop images in editor, conflict with sidebar react-dnd (#1918)

* fix: Drag and drop images in editor, conflict with sidebar react-dnd
see: https://github.com/react-dnd/react-dnd/pull/3052

* Bump to non-canary

* Upgrade react-dnd

* react-dnd api changes

* lint

* fix: dnd doesn't work on first render

* remove unneccessary async

* chore: Update react-dnd (API changed again)

* restore fade
This commit is contained in:
Tom Moor
2021-03-09 18:41:30 -08:00
committed by GitHub
parent ed2a42ac27
commit bac7a364d0
8 changed files with 321 additions and 323 deletions

View File

@ -16,7 +16,7 @@ type AlignValues =
| "flex-start"
| "flex-end";
type Props = {
type Props = {|
column?: ?boolean,
shrink?: ?boolean,
align?: AlignValues,
@ -24,12 +24,18 @@ type Props = {
auto?: ?boolean,
className?: string,
children?: React.Node,
};
role?: string,
|};
const Flex = (props: Props) => {
const Flex = React.forwardRef<Props, HTMLDivElement>((props: Props, ref) => {
const { children, ...restProps } = props;
return <Container {...restProps}>{children}</Container>;
};
return (
<Container ref={ref} {...restProps}>
{children}
</Container>
);
});
const Container = styled.div`
display: flex;