1.7.2 • Published 7 months ago

commonux2 v1.7.2

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

CommonUX2.0

A collection of styled components for use in ABB projects, designed for React and Next.js. It features TypeScript support, integrates Lucide icons, and is built on Radix primitives with Tailwind CSS.

Installation

To install, run the following command in your project:

npm install commonux2

Configuration

Update your tsconfig.json with the following paths configuration:

{
  // ...
  "baseUrl": ".",
  "paths": {
    // ...
    "commonux2/components/*": ["node_modules/commonux2/dist/components/*"]
  }
}

Import `style.css' from package to your main component

// main.tsx
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "commonux2/styles.css";

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <App />
  </StrictMode>
);

Start importing components and use it

import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogTrigger,
} from "commonux2/components/alert-dialog";

export function SomeComponent() {
  return (
    <div>
      <AlertDialog>
        <AlertDialogTrigger className="text-red-500">Open</AlertDialogTrigger>
          {/*  various component takes variant, size, color and classNames  */}
        <AlertDialogContent variant="error">
          <AlertDialogHeader>
            <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
            <AlertDialogDescription>
              This action cannot be undone. This will permanently delete your
              account and remove your data from our servers.
            </AlertDialogDescription>
          </AlertDialogHeader>
          <AlertDialogFooter>
            <AlertDialogCancel>Cancel</AlertDialogCancel>
            <AlertDialogAction>Continue</AlertDialogAction>
          </AlertDialogFooter>
        </AlertDialogContent>
      </AlertDialog>
    </div>
  );
}

References

1.7.2

7 months ago

1.7.1

8 months ago

1.7.0

8 months ago

1.6.9

8 months ago

1.6.4

10 months ago

1.6.3

10 months ago

1.6.2

10 months ago

1.6.1

10 months ago

1.6.0

10 months ago

1.6.8

9 months ago

1.5.9

10 months ago

1.6.7

9 months ago

1.5.8

10 months ago

1.6.6

9 months ago

1.5.7

10 months ago

1.6.5

10 months ago

1.5.6

10 months ago

1.5.5

10 months ago

1.5.4

10 months ago

1.5.3

10 months ago

1.5.2

10 months ago

1.5.1

10 months ago

1.4.6

10 months ago

1.4.5

10 months ago

1.4.4

10 months ago

1.4.3

10 months ago

1.4.2

10 months ago

1.5.0

10 months ago

1.4.1

10 months ago

1.4.0

10 months ago

1.4.9

10 months ago

1.4.8

10 months ago

1.4.7

10 months ago

1.3.6

10 months ago

1.3.5

10 months ago

1.3.4

10 months ago

1.3.3

10 months ago

1.3.2

10 months ago

1.3.1

10 months ago

1.3.0

10 months ago

1.2.4

10 months ago

1.2.3

10 months ago

1.2.2

11 months ago

1.2.1

11 months ago

1.2.0

11 months ago

1.1.2

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago