notation-pooler-nc
v0.2.2
Published
Composant React de collecte de notation utilisateur, publiable sur npmjs.
Downloads
1,349
Readme
notation-pooler-nc
Composant React de collecte de notation utilisateur, publiable sur npmjs.
Build local
bun install
bun run buildLe build génère:
dist/rating-pool-nc.es.jsdist/rating-pool-nc.umd.jsdist/style.css- les types TypeScript (
dist/**/*.d.ts)
Publication npmjs
npm login
npm publish --access publicUtilisation dans un projet React
import { NotationComponent } from "notation-pooler-nc";Le package importe déjà son CSS automatiquement.
Exemple:
export default function Demo() {
return (
<NotationComponent
theme="light"
locale="en"
nameProduct="Mon Produit"
apiUrl="https://mon-api.com/notations"
apiKey="ma-cle-api"
/>
);
}Props
theme?: "light" | "dark"nameProduct?: stringuniqId?: stringapiUrl?: string(par défauthttp://localhost:8080/notations)apiKey?: string(par défauthello)locale?: "fr" | "en" | "es"— langue de l’interface (défaut :"fr")
