From 512f45419e0210d5c3643533cc389c5ccc40cbf8 Mon Sep 17 00:00:00 2001 From: Tiberiu Ichim Date: Sat, 3 Oct 2020 21:43:35 +0300 Subject: [PATCH] Add css transition --- src/SidebarPopup/SidebarPopup.jsx | 45 ++++++++++++++++----------- src/StyleWrapper/StyleWrapperEdit.jsx | 17 +++++++++- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/src/SidebarPopup/SidebarPopup.jsx b/src/SidebarPopup/SidebarPopup.jsx index d3cff18..aac82a6 100644 --- a/src/SidebarPopup/SidebarPopup.jsx +++ b/src/SidebarPopup/SidebarPopup.jsx @@ -1,28 +1,35 @@ import React from 'react'; import { Portal } from 'react-portal'; +import { CSSTransition } from 'react-transition-group'; +const DEFAULT_TIMEOUT = 500; // TODO: add CSS transition on display const SidebarPopup = ({ children, open }, ref) => { - return open ? ( - - - - ) : ( - '' + return ( + + + + + ); }; diff --git a/src/StyleWrapper/StyleWrapperEdit.jsx b/src/StyleWrapper/StyleWrapperEdit.jsx index ae39279..84897db 100644 --- a/src/StyleWrapper/StyleWrapperEdit.jsx +++ b/src/StyleWrapper/StyleWrapperEdit.jsx @@ -1,5 +1,6 @@ import React from 'react'; import { Portal } from 'react-portal'; +import { Button } from 'semantic-ui-react'; import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib'; import { Icon } from '@plone/volto/components'; import themeSVG from '@plone/volto/icons/theme.svg'; @@ -55,7 +56,21 @@ export default (props) => { + + {schema.title} + + } onChangeField={(id, value) => { onChangeValue(id, value); }}