fix: button being decalled

Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
Florian Bouillon 2023-02-27 12:06:29 +01:00
parent f197e92270
commit 40a5a2d9ac
Signed by: Florian Bouillon
GPG Key ID: E05B3A94178D3A7C
2 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@
svg
position absolute
user-select none
padding 8px
padding 16px
color black
@media (prefers-color-scheme dark)
color white
@ -31,15 +31,15 @@
&.iconClickable
pointer-events all
cursor pointer
top 14px
top -2px
&.left
left 16px // input padding-left
left 0px // input padding-left
~ label
left 16px + 24px + 10px
left 0px + 24px + 10px
&.right
right 16px
right 0
select
appearance none

View File

@ -350,8 +350,8 @@ export default class Input extends React.Component<Props, States> {
}
if ('icon' in Icon) {
// 18 + 8 of padding
return <Icon.icon size={8*2+18} className={buildClassName(css[position], css.iconClickable)} onClick={async () => {
// 18 + 16 of padding
return <Icon.icon size={16*2+18} className={buildClassName(css[position], css.iconClickable)} onClick={async () => {
if (this.props.disabled) {return}
const value = Icon.transformer(this.state.value ?? this.state.displayedValue ?? '')
this.setState({ value: value, displayedValue: value, valueUpdate: true })