diff --git a/src/Components/FloatingButton/FloatingButton.tsx b/src/Components/FloatingButton/FloatingButton.tsx index fb5fc1c..a1d9c4b 100644 --- a/src/Components/FloatingButton/FloatingButton.tsx +++ b/src/Components/FloatingButton/FloatingButton.tsx @@ -1,10 +1,38 @@ import * as React from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline'; interface IFloatingButtonProps { + children: React.ReactNode[] | React.ReactNode + className: string } +const toggleState = ( + isHidden: boolean, + setHidden: React.Dispatch> +) => { + setHidden(!isHidden); +}; + const FloatingButton: React.FC = (props: IFloatingButtonProps) => { - return <>; + const [isHidden, setHidden] = React.useState(true); + const buttonListClasses = isHidden ? 'opacity-0' : 'opacity-100'; + const icon = isHidden + ? + : ; + + return ( +
+
+ { props.children } +
+ +
); }; export default FloatingButton; diff --git a/src/Editor.tsx b/src/Editor.tsx index 482b91a..90b8e2b 100644 --- a/src/Editor.tsx +++ b/src/Editor.tsx @@ -9,6 +9,7 @@ import { History } from './Components/History/History'; import { ContainerModel, findContainerById, IContainerModel, MakeIterator } from './Interfaces/ContainerModel'; import Properties from './Interfaces/Properties'; import { IHistoryState } from './App'; +import FloatingButton from './Components/FloatingButton/FloatingButton'; interface IEditorProps { configuration: Configuration, @@ -334,13 +335,16 @@ class Editor extends React.Component { > { current.MainContainer } - + + + + ); } diff --git a/src/index.scss b/src/index.scss index c7e0d50..ad410c8 100644 --- a/src/index.scss +++ b/src/index.scss @@ -10,9 +10,12 @@ @apply pl-6 pr-6 pt-2 pb-2 w-full } .close-button { - @apply transition-all w-full h-auto p-4 flex + @apply transition-all w-full h-auto p-4 flex } .mainmenu-btn { @apply transition-all bg-blue-100 hover:bg-blue-200 text-blue-700 text-lg font-semibold p-8 rounded-lg } + .floating-btn { + @apply h-full w-full text-white align-middle items-center justify-center + } } \ No newline at end of file