Hello everyone,
I’m new to the forum and have to ask for help right away.
I am currently in the process of creating a custom widget for my rooms, but I have encountered 2 problems:
-
How can i center my icon over the text?
-
How can i reduce the space between the icon and the text? I tried to override margin and padding, but the space is getting bigger not smaller
uid: roomWidget
tags: []
props:
parameters:
- context: item
description: Item for the actual temperature
label: Actual Temperature
name: ActualTemperature
required: false
type: TEXT
- context: item
description: Item for the target temperature
label: Target Temperature
name: TargetTemperature
required: false
type: TEXT
- context: item
description: Item for the humidity
label: Humidity
name: Humidity
required: false
type: TEXT
- context: text
label: Title
name: Title
required: false
type: TEXT
- context: text
label: Icon
name: Icon
required: false
type: TEXT
parameterGroups: []
timestamp: Nov 17, 2023, 9:37:07 PM
component: f7-card
config:
style:
--font-size-small: 15px
--font-size-normal: 20px
border-radius: 10px
slots:
default:
- component: f7-row
slots:
default:
- component: f7-col
config:
style:
width: auto
align-items: center
justify-content: center
slots:
default:
- component: oh-icon
config:
icon: =props.Icon
height: 30
style:
margin-right: 7px
- component: Label
config:
text: =props.Title
style:
font-size: var(--font-size-normal)
margin-right: 10px
- component: f7-col
config:
style:
flex: 1
slots:
default:
- component: f7-row
slots:
default:
- component: f7-row
config:
style:
align-items: center
slots:
default:
- component: f7-icon
config:
f7: thermometer
style:
font-size: var(--font-size-normal)
- component: Label
config:
text: =items[props.ActualTemperature].state + " (" + items[props.TargetTemperature].state + ")"
style:
font-size: var(--font-size-small)
- component: f7-row
slots:
default:
- component: f7-row
slots:
default:
- component: f7-row
config:
visible: true
slots:
default:
- component: f7-row
config:
style:
align-items: center
slots:
default:
- component: f7-icon
config:
f7: drop
style:
font-size: var(--font-size-normal)
- component: Label
config:
text: =items[props.Humidity].state
style:
font-size: var(--font-size-small)
I hope someone can help me.