@dedevs/docs-widget v0.0.16
docs-widget
Chat with your docs using our customizable widget.
A simple React component that displays 'Hello World'. This package is intended as a basic example of how to create and publish a React component to npm.
Installation
To install this component, you can use pnpm (etc.):
pnpm install @dedevs/docs-widgetUsage
Once installed, you can import and use the DocsWidget component in your React application:
import React from "react";
import DocsWidget from "@dedevs/docs-widget";
function App() {
return (
<div>
<h1>My Application</h1>
<DocsWidget />
</div>
);
}
export default App;Development and Testing Locally
To test this component locally before publishing:
Navigate to the component's directory:
cd path/to/docs-widget(For your setup, this would be
cd /Users/buns/Documents/GitHub/DeDevsClub/docs-widget)Link the package locally: This command creates a global symbolic link for your package.
pnpm linkCreate a new React test application (if you don't have one): Use Create React App or your preferred setup. Navigate outside the component's directory first.
cd .. npx create-react-app my-test-app cd my-test-appLink the component to your test application: This command links the globally linked package to your test application's
node_modules.pnpm link @dedevs/docs-widgetUse the component in your test application: Modify
src/App.jsinmy-test-appas shown in the Usage section above.Run the test application:
pnpm startThis should open your browser and display the 'Docs Widget' component.
Contributing
Feel free to open issues or submit pull requests. For major changes, please open an issue first to discuss what you would like to change.