feat: labels

This commit is contained in:
Matei Adriel 2020-04-13 17:59:41 +03:00
parent 8168d60ed9
commit 7df80284f9
3 changed files with 19 additions and 1 deletions

View file

@ -39,6 +39,10 @@ div .gate-prop-container {
flex-direction: row; flex-direction: row;
justify-content: start; justify-content: start;
&.visible {
margin: 1rem;
}
} }
div #save-props { div #save-props {

View file

@ -103,7 +103,15 @@ export const GatePropery = ({ raw, gate }: GatePropertyProps) => {
} }
})() })()
return <div className="gate-prop-container">{input}</div> return (
<div
className={`gate-prop-container ${
input !== emptyInput ? 'visible' : ''
}`}
>
{input}
</div>
)
} }
/** /**

View file

@ -63,6 +63,12 @@ export const DefaultGateTemplate: GateTemplate = {
!gate.template.properties.data.some( !gate.template.properties.data.some(
(prop) => prop.needsUpdate (prop) => prop.needsUpdate
) )
},
{
type: 'string',
base: 'my-logic-gate',
name: 'label',
show: ({ internal }: { internal: boolean }) => internal
} }
] ]
}, },