Skip to content

Commit

Permalink
oh-colorpicker: Allow setting style
Browse files Browse the repository at this point in the history
Fixes openhab#1713.

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Jul 27, 2023
1 parent 110498a commit 6310dd9
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<div v-if="!config.openIn" ref="container" style="width: 100%" />
<div v-else ref="swatch" :class="config.swatchClasses || ['elevation-4', 'elevation-hover-8', 'elevation-pressed-1', 'elevation-transition']" :style="{
<div :style="config.style">
<div v-if="!config.openIn" ref="container" style="width: 100%" />
<div v-else ref="swatch" :class="config.swatchClasses || ['elevation-4', 'elevation-hover-8', 'elevation-pressed-1', 'elevation-transition']" :style="{
width: (config.swatchSize) ? config.swatchSize + 'px' : '32px',
height: (config.swatchSize) ? config.swatchSize + 'px' : '32px',
borderRadius: (config.swatchBorderRadius) ? config.swatchBorderRadius + 'px' : '6px',
cursor: 'pointer'
}" />
}" />
</div>
</template>

<script>
Expand Down

0 comments on commit 6310dd9

Please sign in to comment.