Fix layout plugin source import violation

Summary: Fixed direct source import of Flipper code from layout plugin which broke its packaging

Reviewed By: cekkaewnumchai

Differential Revision: D22135716

fbshipit-source-id: 8f67a21ed94c13dd73d24ef8692d37ae51963319
This commit is contained in:
Anton Nikolaev
2020-06-19 08:43:18 -07:00
committed by Facebook GitHub Bot
parent 40a5721d45
commit 2085d4e362
3 changed files with 12 additions and 7 deletions

View File

@@ -20,7 +20,9 @@ import {clipboard, MenuItemConstructorOptions} from 'electron';
import React, {MouseEvent, KeyboardEvent} from 'react';
import {Scrollable} from '../..';
export const ROW_HEIGHT = 23;
export const ElementsConstants = {
rowHeight: 23,
};
const backgroundColor = (props: {
selected: boolean;
@@ -58,7 +60,7 @@ const ElementsRowContainer = styled(ContextMenu)<any>((props) => ({
color: props.selected || props.focused ? colors.white : colors.grapeDark3,
flexShrink: 0,
flexWrap: 'nowrap',
height: ROW_HEIGHT,
height: ElementsConstants.rowHeight,
paddingLeft: (props.level - 1) * 12,
paddingRight: 20,
position: 'relative',
@@ -86,10 +88,10 @@ ElementsRowDecoration.displayName = 'Elements:ElementsRowDecoration';
const ElementsLine = styled.div<{childrenCount: number}>((props) => ({
backgroundColor: colors.light20,
height: props.childrenCount * ROW_HEIGHT - 4,
height: props.childrenCount * ElementsConstants.rowHeight - 4,
position: 'absolute',
right: 3,
top: ROW_HEIGHT - 3,
top: ElementsConstants.rowHeight - 3,
zIndex: 2,
width: 2,
borderRadius: '999em',