import { Controller } from "@hotwired/stimulus" import React from "react" import { createRoot } from "react-dom/client" import { Button } from "@/components/ui/button" // Connects to data-controller="shadcn-test" export default class extends Controller { static targets = ["container"] connect() { console.log("Shadcn Button Test Controller connected") this.renderButton() } renderButton() { const container = this.containerTarget const root = createRoot(container) root.render(
Ce bouton utilise shadcn/ui + Tailwind + PostCSS