themesberg / flowbite-svelte

Official Svelte components built for Flowbite and Tailwind CSS
https://flowbite-svelte.com
MIT License
2.13k stars 262 forks source link

FileInput: Color attribute #1441

Open cintek opened 2 days ago

cintek commented 2 days ago

Add a color attribute to the FileInput so developers can change the color of the button that is part of the input.

Now there are only two colors which are depending on the theme you are using. In a light theme the button of the FileInput is black and if black is not an accent color in your theme the button is too outstanding.

To style the button of the FileInput you could generally use the file-modifier of TailwindCSS. I tried to do so but it had no effect. Maybe this is because of some file preprocessing or anything else. Does somebody have an idea?

shinokada commented 17 hours ago

Can you use <Fileupload class="your-tailwind-color" /> ?

cintek commented 17 hours ago

In one project I'm working in we use primary as accent color but when I use <Fileupload class="primary" /> this doesn't change anything.