fixed up styling for autos

This commit is contained in:
ari committed 2022-05-05 15:03:33 -04:00
1 parent 634f3e9219
commit c256400518
9 files changed
+104 -107

No files matched your search

@@ -2,8 +2,8 @@ import "styles/root.css";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { useState } from "react";
import { AutomationList } from ".";
import { NODE_HEIGHT, NODE_WIDTH, ADD_HEIGHT, ADD_WIDTH, CIRCLE_SIZE, DISTANCE_FACTOR } from 'components/DAGSvgs/constants';
import { createMockAuto } from "utils/mocks";
import * as dgconst from 'components/DAGSvgs/constants';
export default {
title: 'App/AutomationList',
@@ -11,12 +11,14 @@ export default {
parameters: { actions: { argTypesRegex: '^on.*' } },
args: {
dims: {
nodeHeight: NODE_HEIGHT,
nodeWidth: NODE_WIDTH,
addHeight: ADD_HEIGHT,
addWidth: ADD_WIDTH,
circleSize: CIRCLE_SIZE,
distanceFactor: DISTANCE_FACTOR,
nodeHeight: dgconst.NODE_HEIGHT,
nodeWidth: dgconst.NODE_WIDTH,
distanceFactor: dgconst.DISTANCE_FACTOR,
circleSize: dgconst.CIRCLE_SIZE,
padding: {
x: dgconst.PADDING,
y: dgconst.PADDING,
},
}
}
} as ComponentMeta<typeof AutomationList>;
+10 -9
View File
@@ -1,21 +1,22 @@
/* root elements */
.automation-list--root {
width : 100%;
height : 100%;
display : flex;
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
overflow : hidden;
overflow: hidden;
}
.automation-list--list {
flex : 1;
flex: 1;
min-width: 400px;
max-width: 400px;
position : relative;
position: relative;
}
.automation-list--viewer {
overflow: hidden;
flex: 1;
}
/* list children: on hide */
@@ -41,6 +42,6 @@
.automation-list--list-hide {
position: absolute;
bottom : 10px;
right : 5px;
}
bottom: 0.5em;
right: 0.5em;
}
@@ -8,6 +8,7 @@ import { ArrowIcon } from "components/Icons";
import { ButtonIcon } from "components/Icons/ButtonIcons";
import { ApiService } from "apiService/core";
import { AutomationListBox } from "./AutomationListBox";
import { DAGAutomationFlowDims } from 'DAGFlow/types';
interface AutomationListParams {
@@ -15,7 +16,7 @@ interface AutomationListParams {
onUpdate: (i: number, auto: AutomationData) => void;
onAdd: (auto: AutomationData) => void;
onRemove: (i: number) => void;
dims: DAGBoardElmDims;
dims: DAGAutomationFlowDims;
}
export const AutomationList: FC<AutomationListParams> = ({