npm-lib-react-005-rollup-ok
npm install @aledev-org/npm-lib-react-005-rollup-ok
Import Global CSS (about Traditional CSS
// src/main.tsx;
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
// CSS file from my component library
import "@aledev-org/npm-lib-react-005-rollup-ok/dist/index.css";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>
);
// src/App.tsx
import { Button, Badge } from "@aledev-org/npm-lib-react-005-rollup-ok";
function App() {
return (
<div>
<Button onClick={() => alert("Clicked!")}>Click Me</Button>
<Badge label="hola!" variant="cyan" />
<Badge label="world!" variant="green" />
</div>
);
}