@kmillion/core-ui
v0.1.57
Published
A React component library for K-Million applications, providing a set of reusable UI components and utilities.
Downloads
168
Readme
@kmillion/core-ui
A React component library designed specifically for developing K-Million applications, modules, and integrations. This package provides the core UI components and utilities needed to build consistent and reliable interfaces for K-Million's admin panel and services.
Purpose
This library is intended for developers who are:
- Building K-Million admin applications
- Creating K-Million modules
- Developing integrations with K-Million services
- Extending K-Million's functionality
Installation
npm install @kmillion/core-uiUsage
First, import the CSS file in your Tailwind CSS styles file:
@import "@kmillion/core-ui/dist/core-ui.css";Then, you can use the components in your React application:
import { Button } from "@kmillion/core-ui";
function MyComponent() {
return <Button variant="primary">Click me</Button>;
}Notifications
The library includes a notification service that can be used to display toast notifications. Here's how to use it:
// The notification service is automatically available through the window object
window.KerpNotification.show({
status: "success", // 'success' | 'danger' | 'warning' | 'info'
text: "Operation completed successfully",
duration: 3000, // optional, defaults to 3000ms
});Available notification statuses:
success: Green notification with checkmark icondanger: Red notification with X iconwarning: Yellow notification with exclamation iconinfo: Violet notification with info icon
Documentation
For detailed documentation and examples, visit our documentation site.
License
MIT © K-Million
