Improve history style (#5)
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/5
This commit is contained in:
Siklos 2022-08-04 08:12:22 -04:00
parent 86535f9940
commit 72dfb4f9bb
3 changed files with 86 additions and 11 deletions

View file

@ -6,6 +6,7 @@ import { IContainerModel, getDepth, MakeIterator } from '../SVG/Elements/Contain
interface IElementsSidebarProps {
MainContainer: IContainerModel | null,
isOpen: boolean,
isHistoryOpen: boolean
SelectedContainer: IContainerModel | null,
onClick: () => void,
onPropertyChange: (key: string, value: string) => void,
@ -25,7 +26,12 @@ export class ElementsSidebar extends React.Component<IElementsSidebarProps> {
}
public render() {
const isOpenClasses = this.props.isOpen ? 'right-0' : '-right-64';
let isOpenClasses = '-right-64';
if (this.props.isOpen) {
isOpenClasses = this.props.isHistoryOpen
? 'right-64'
: 'right-0';
}
const containerRows: React.ReactNode[] = [];
this.iterateChilds((container: IContainerModel) => {