rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.27k stars 180 forks source link

containerStyles and placeholderText #358

Closed ch1coon closed 2 years ago

ch1coon commented 2 years ago

I'm trying to change the list background color on hover but i had no sucess

<script>
  let containerStyles = "--itemHoverColor: black;";
  let placeholderText = "Some Text";
</script>

<div class="themed">
  <Select style="{containerStyles}" placeholder="{placeholderText}"/>
<div/>

<style>
.themed {
  --background: rgb(19 19 19);
  --listBackground: rgb(19 19 19);
  --border: 3px;
  --borderRadius: 10px;
  --placeholderColor: transparent;
  --containerColor: black;
  --itemHoverColor: black;
}
</style>
rob-balfre commented 2 years ago

@ch1coon Here you go :)

https://svelte.dev/repl/540f76a7399147a1b1a41db3416e7118?version=3.12.1

ch1coon commented 2 years ago

tyyyy a lot, how can i change placeholder text? it's getting the array name as placeholder

rob-balfre commented 2 years ago

@ch1coon https://svelte.dev/repl/540f76a7399147a1b1a41db3416e7118?version=3.12.1