Savjee/button-text-card

Change size of actual button?

Opened this issue · 5 comments

Is there a way to change the size of the actual button? Not just the size of the icon inside the button. I'm looking at the https://github.com/custom-cards/button-card which has a style property that allows for changing the dimensions of the actual button.

Right now, that's not possible. Good suggestion!
Can you take this up? Otherwise, I'll plan it when I have some spare time.

Sounds good. I'll give it a go.

luixal commented

Hi,

just looking for this, is it possible to change card size?

I've tried using card_mod but doesn't seem to work as the card just gets cut off.

Thanks!

Savjee commented

Not at this moment, sorry.

luixal commented

Ok, just in case someone gets here and really needs it, this is how I managed to change its size.

Let's take this one as an example:

type: custom:button-text-card
title: Example
subtitle: Larger example text
icon: mdi:home
large: true
font_color: white
background_color: blue

I tweaked it using card_mod, like this:

type: custom:button-text-card
title: Example
subtitle: Larger example text
icon: mdi:home
large: true
font_color: white
background_color: blue
style: |
  .flex-container {
    padding: 12px 0px 12px;
    height: 45px;
  }

  .icon-container, .text-container {
    height: 100% !important;
  }

Hope it helps someone :)