Skip to content

Commit

Permalink
feat: ledPicker 사이즈변경 대응
Browse files Browse the repository at this point in the history
  • Loading branch information
Tnks2U committed Dec 18, 2024
1 parent e8dce60 commit dc87b24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/assets/entry/scss/common/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
14 changes: 13 additions & 1 deletion src/components/ledPicker/ledPicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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 : ''
Expand Down

0 comments on commit dc87b24

Please sign in to comment.