Added PreviewFiles to devTool server side.
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
SidebarStyle,
|
||||
} from "./data-options.style.js";
|
||||
import {isClickOutside, isEscHit} from "../responsive-button/ResponsiveButton.jsx";
|
||||
import {DesignPreview} from "./DesignPreview.jsx";
|
||||
|
||||
function DataOptions(props = {}) {
|
||||
props.rootAttributes = props.rootAttributes ?? {};
|
||||
@@ -41,8 +42,9 @@ function DataOptions(props = {}) {
|
||||
|
||||
const handleBlur = async (e) => await isClickOutside(e) ? closeSidebar() : null;
|
||||
|
||||
return <>
|
||||
<SidebarButtonToggleStyle onClick={() => openSidebar()} title="Open a Sidebar with Data Options">#</SidebarButtonToggleStyle>
|
||||
return <div style={{display: 'flex', gap: '1rem', alignItems: 'center'}}>
|
||||
<SidebarButtonToggleStyle onClick={() => openSidebar()} title="Open a Sidebar with Data Options"/>
|
||||
<DesignPreview/>
|
||||
|
||||
<SidebarStyle className={sidebarOpen ? 'active sidebar-active' : ''} tabIndex='0' onBlur={handleBlur}>
|
||||
<SidebarHeaderStyle>
|
||||
@@ -66,7 +68,7 @@ function DataOptions(props = {}) {
|
||||
<pre>{JSON.stringify(state.data, null, 2)}</pre>
|
||||
}
|
||||
</SidebarStyle>
|
||||
</>;
|
||||
</div>;
|
||||
|
||||
function openSidebar() {
|
||||
setSidebarOpen(true);
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import React, {useCallback, useEffect, useState} from 'react';
|
||||
|
||||
export function DesignPreview(props = {}) {
|
||||
return <span style={{color: '#999'}}>Preview</span>
|
||||
}
|
||||
Reference in New Issue
Block a user