UNPKG

@runstack/ui

Version:

React UI components library for runstack

80 lines (55 loc) 1.13 kB
# @runstack/ui A collection of reusable React UI components for runstack applications. ## Installation ```bash npm install @runstack/ui ``` ## Requirements - React >= 18.0.0 - React DOM >= 18.0.0 ## Usage ### Draggable List ```tsx import { DraggableList } from '@runstack/ui/draggable-list' function MyComponent() { const items = [ { id: '1', title: 'Item 1' }, { id: '2', title: 'Item 2' }, { id: '3', title: 'Item 3' } ] const handleReorder = (newItems) => { // Handle reordered items } return ( <DraggableList items={items} onReorder={handleReorder} /> ) } ``` ### Utilities ```tsx import { cn } from '@runstack/ui' // Merge classes with tailwind-merge const className = cn('base-class', 'additional-class', { 'conditional-class': condition }) ``` ## Components - **DraggableList**: A drag-and-drop sortable list component with editing capabilities ## Development ```bash # Install dependencies npm install # Run tests npm test # Run tests in watch mode npm run test:watch # Build the package npm run build # Lint the code npm run lint ``` ## License MIT