artem-sedykh / mini-climate-card

Minimalistic climate card for Home Assistant Lovelace UI
MIT License
262 stars 19 forks source link

Adding ability to add custom style #58

Open nicoladefranceschi opened 2 years ago

nicoladefranceschi commented 2 years ago

I would like to have the ability to add custom CSS for some small fixes.

In src/main.js

 static get styles() {
    return [
      sharedStyle,
      style,
    ];
  }

it would be nice to also have the ability to have a custom config "style" attributes where the user can add the wanted css For instance, I'd like to change the size of the target and current temperature, but there could be many changes that are all easy with just some css

Perhaps a simple changes like this would suffice:

 static get styles() {
    const array = [
      sharedStyle,
      style,
    ];
    if(this.config.customStyle){
        array.push(this.config.customStyle)
    }
    return array;
  }

Let me know thanks