Skip to content

Commit 8c51d1b

Browse files
committed
block styles padding
1 parent 57487a3 commit 8c51d1b

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

logicline-view/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# logicline-view
22

3-
A library used to display logic line state snapshots.
3+
A library used to display [logic line](https://github.com/roboplc/logicline)
4+
state snapshots.
45

56
```react-tsx
67
import { useState, useEffect } from "react";

logicline-view/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "logicline-view",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"type": "module",
55
"scripts": {
66
"build": "vite build && tsc src/*.mts --skipLibCheck --allowImportingTsExtensions --esModuleInterop --jsx react-jsx --declaration --lib es2020,dom,es2021.String --downlevelIteration --emitDeclarationOnly --declarationDir dist/ && mv dist/lib.d.mts dist/logicline-view.es.d.ts",
@@ -18,6 +18,12 @@
1818
"require": "./dist/logicline-view.umd.js"
1919
}
2020
},
21+
"author": "Bohemia Automation",
22+
"license": "MIT",
23+
"bugs": {
24+
"url": "https://github.com/roboplc/logicline/issues"
25+
},
26+
"homepage": "https://github.com/roboplc/logicline/",
2127
"peerDependencies": {
2228
"@emotion/react": "^11.11.1",
2329
"@emotion/styled": "^11.11.1",

logicline-view/src/components/Block/Block.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@
119119
background-color: var(--logicline-decorator-color);
120120
}
121121

122+
.logicline_block-body--filled {
123+
padding: 0 6px;
124+
}
125+
126+
.logicline_block-body--empty {
127+
padding: 9px 6px;
128+
}
129+
122130
.logicline_block-input {
123131
display: flex;
124132
align-items: center;

logicline-view/src/components/Block/Block.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,11 @@ export const Block = ({
9393
{step.name}
9494
</div>
9595
<div
96-
className="logicline_block-body"
97-
style={{
98-
padding: inputs.every((input) => input === null)
99-
? "9px 6px"
100-
: "0 6px"
101-
}}
96+
className={`logicline_block-body ${
97+
inputs.every((input) => input === null)
98+
? "logicline_block-body--empty"
99+
: "logicline_block-body--filled"
100+
}`}
102101
>
103102
{inputs.map((inputValue, idx) => (
104103
<div key={idx} className="logicline_block-input">

0 commit comments

Comments
 (0)