UNPKG

loopey

Version:

A React UI component library for chat widgets.

63 lines (45 loc) 1.15 kB
# my-chat-## Usage ```tsx import { Button, ChatWidget, AdvancedChatWidget } from "loopey"; function App() { return ( <div> <Button>Click me</Button> {/* Simple Chat Widget */} <ChatWidget onSendMessage={(msg) => console.log(msg)} /> {/* Advanced Chat Widget with Markdown support */} <AdvancedChatWidget title="Chat Support" companyName="Your Company" greeting="Hello! How can I help you today?" onSendMessage={(msg) => console.log(msg)} primaryColor="#2563eb" /> </div> ); } ``` The CSS is automatically included when you import the components - no additional CSS imports needed!React UI component library for chat widgets. ## Installation ```bash npm install my-chat-widget ``` ## Usage ```tsx import { Button } from "my-chat-widget"; import "my-chat-widget/dist/style.css"; function App() { return <Button>Click me</Button>; } ``` ## Development - Components are in `src/components/` - Build with: ```bash npm run build ``` ## Publishing 1. Build the library: `npm run build` 2. Publish to npm: `npm publish --access public` ## License MIT