Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: attribute input styling padding update for asset viewer

Rich Turnera708af2ff5bf
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index 3af75fc10..75b717aec 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -796,7 +796,7 @@ export function getAttributeTemplate(asset: Asset, attribute: Attribute<any>, ho
}
return html`
- <or-attribute-input .assetType="${asset!.type}" .attribute="${attribute}" .assetId="${asset.id!}" .disabled="${attrDisabled}" .label="${attrLabel}" .readonly="${attrReadonly}" .disableButton="${attrDisableButton}" .inputType="${attrInputType}" .hasHelperText="${!attrDisableHelper}"></or-attribute-input>
+ <or-attribute-input class="force-btn-padding" .assetType="${asset!.type}" .attribute="${attribute}" .assetId="${asset.id!}" .disabled="${attrDisabled}" .label="${attrLabel}" .readonly="${attrReadonly}" .disableButton="${attrDisableButton}" .inputType="${attrInputType}" .hasHelperText="${!attrDisableHelper}"></or-attribute-input>
`;
}
diff --git a/ui/component/or-attribute-input/src/index.ts b/ui/component/or-attribute-input/src/index.ts
index e969fb70c..4ea106def 100644
--- a/ui/component/or-attribute-input/src/index.ts
+++ b/ui/component/or-attribute-input/src/index.ts
@@ -90,7 +90,7 @@ export function getAttributeInputWrapper(content: TemplateResult, value: any, lo
}
return html`
- <div id="wrapper" class="${(buttonIcon === undefined || buttonIcon || fullWidth) ? "no-padding" : "right-padding"}">
+ <div id="wrapper" class="${buttonIcon || fullWidth ? "no-padding" : "right-padding"}">
${content}
<div id="scrim" class="${ifDefined(loading ? undefined : "hidden")}"><progress class="pure-material-progress-circular"></progress></div>
</div>
@@ -277,6 +277,10 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
display: inline-block;
}
+ :host(.force-btn-padding) #wrapper.no-padding {
+ /*padding-right: 52px;*/
+ }
+
#wrapper or-mwc-input, #wrapper or-map {
width: 100%;
}