From dc87b24138d60552036ea9741e6fe066daf6632f Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Wed, 18 Dec 2024 19:06:22 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20ledPicker=20=EC=82=AC=EC=9D=B4=EC=A6=88?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/entry/scss/common/_tooltip.scss | 3 --- src/components/ledPicker/ledPicker.jsx | 14 +++++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/assets/entry/scss/common/_tooltip.scss b/src/assets/entry/scss/common/_tooltip.scss index 6f11b368..5cb83890 100644 --- a/src/assets/entry/scss/common/_tooltip.scss +++ b/src/assets/entry/scss/common/_tooltip.scss @@ -84,14 +84,11 @@ user-select: none; z-index: 251; font-size: 14px; - width: 224px; - height: 296.8px; background-color: '#d6e9f4'; border-radius: 2px; box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.25); border: solid 1px #bfd8e6; position: fixed; - // transition: all ease 0.3s; padding: 0; } diff --git a/src/components/ledPicker/ledPicker.jsx b/src/components/ledPicker/ledPicker.jsx index 6ad20d85..7c3c5fba 100644 --- a/src/components/ledPicker/ledPicker.jsx +++ b/src/components/ledPicker/ledPicker.jsx @@ -30,6 +30,14 @@ class LedPicker extends Component { return 9; } + get CONTAINER_WIDTH() { + return 24 + this.state.ledStatus.length * 39; + } + + get CONTAINER_HEIGHT() { + return 101 + this.state.ledStatus[0].length * 39; + } + constructor(props) { super(props); this.theme = Theme.getStyle('popup'); @@ -257,7 +265,11 @@ class LedPicker extends Component { ref={(dom) => { this.ledPicker = dom; }} - style={ledPickerStyle} + style={{ + ...ledPickerStyle, + width: this.CONTAINER_WIDTH, + height: this.CONTAINER_HEIGHT, + }} onClick={onClick} className={`${this.theme.tooltip_box} ${this.theme.led_picker} ${ isUpStyle ? this.theme.up : ''