themesberg / tailwind-blazor-starter

Open-source project to get you started with Tailwind CSS, Blazor, and the Flowbite UI components
https://flowbite.com/docs/getting-started/blazor/
MIT License
22 stars 9 forks source link

Modal Fix In Template Project #6

Open chrisoChen opened 9 months ago

chrisoChen commented 9 months ago

Added fix so modal opens after clicking on the button in the tailwind template starter project

Fix involves the following:

  1. Use libman instead of npm to install flowbite to the starter project
  2. Add a missing attribute, data-modal-target to get the modal to open
  3. Use IJSRuntime to invoke the flowbite function initModals to initialize the modal

Note: Must manually use libman to install flowbite to the wwwroot folder to work. Library files for flowbite have been excluded in this commit.

Screenshot 2023-12-10 121335 Screenshot 2023-12-10 121453