Skip to content

Commit

Permalink
keep label like display on text inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ennoriel committed Feb 15, 2024
1 parent 2aae958 commit fd54d2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 3.0.5

- Fix bug occurring when limiting the amount of textModeInputs or changing the order of textModeInputs
- Fix bug occurring when limiting the amount of textModeInputs or changing the order of textModeInputs (thanks to [al-soup](https://github.com/al-soup))

## 3.0.4

Expand Down
12 changes: 10 additions & 2 deletions src/lib/components/variant/default/TextInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
<span class="disappear" aria-hidden="true">{texts.color[mode]}</span>
<span class="appear">{texts.changeTo} {nextMode}</span>
</button>
{:else}
<div class="button-like">{texts.color[mode]}</div>
{/if}
</div>

Expand Down Expand Up @@ -123,7 +125,8 @@ _N.A._
gap: 10px;
}
input,
button {
button,
.button-like {
flex: 1;
border: none;
background-color: var(--cp-input-color, #eee);
Expand All @@ -139,7 +142,8 @@ _N.A._
font-family: inherit;
}
button {
button,
.button-like {
position: relative;
flex: 1;
margin: 8px 0 0;
Expand All @@ -150,6 +154,10 @@ _N.A._
font-family: inherit;
}
.button-like {
cursor: default;
}
.appear,
.disappear {
position: absolute;
Expand Down

0 comments on commit fd54d2b

Please sign in to comment.