Add padding and refactor our controls component
Summary: also made the controls component full width to push down the visualiser Reviewed By: lblasa Differential Revision: D41548665 fbshipit-source-id: 2bca527e70c92bc0ded120e51a0880f76f7cca87
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a93d571dc0
commit
b214806325
@@ -32,6 +32,15 @@ type LiveClientState = {
|
||||
nodes: Map<Id, UINode>;
|
||||
};
|
||||
|
||||
type UIState = {
|
||||
isPaused: Atom<boolean>;
|
||||
searchTerm: Atom<string>;
|
||||
isContextMenuOpen: Atom<boolean>;
|
||||
hoveredNodes: Atom<Id[]>;
|
||||
focusedNode: Atom<Id | undefined>;
|
||||
treeState: Atom<TreeState>;
|
||||
};
|
||||
|
||||
export function plugin(client: PluginClient<Events>) {
|
||||
const rootId = createState<Id | undefined>(undefined);
|
||||
const metadata = createState<Map<MetadataId, Metadata>>(new Map());
|
||||
@@ -63,7 +72,7 @@ export function plugin(client: PluginClient<Events>) {
|
||||
const nodes = createState<Map<Id, UINode>>(new Map());
|
||||
const snapshot = createState<SnapshotInfo | null>(null);
|
||||
|
||||
const uiState = {
|
||||
const uiState: UIState = {
|
||||
//used to disabled hover effects which cause rerenders and mess up the existing context menu
|
||||
isContextMenuOpen: createState<boolean>(false),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user