npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@interopio/components-react

v0.5.2

Published

React components for the interop.io platform.

Downloads

420

Readme

Quality Gate Status Bugs Code Smells

Overview

The @interopio/components-react library enables you to create your own Components App that will provide system apps for io.Connect Desktop (Channel Selector, dialogs, notifications and more). The library allows complete customization of the io.Connect Desktop system apps. The provided default components can be replaced or extended with your custom ones.

Customized Notification Panel for io.Connect Desktop with custom header, footer and custom text on the buttons for clearing notifications:

Custom Notification Panel

Contents

  • src/assets - contains common asset files;
  • src/components - contains default components for shared UI elements like buttons, forms, icons and more;
  • src/contexts - contains context provider components that are used across the io.Connect Desktop system apps;
  • src/features - contains the default components and hooks for all customizable io.Connect Desktop system apps;
  • src/hooks - contains hooks that are used across the io.Connect Desktop system apps;
  • src/utils - contains reusable functions that are used across the io.Connect Desktop system apps;

Prerequisites

For a io.Connect Desktop project, you must have io.Connect Desktop 9.0 or later.

Install

Components Library

To use the @interopio/components-react library in your project, execute the following command:

npm install @interopio/components-react

Storybook

Storybook is integrated into the project and the currently supported components are added to it. You can use it during development to test components and visualize states more easily.

To build Storybook:

npm run build-storybook

To run Storybook:

npm run storybook

Usage

The @interopio/components-react library provides default components and hooks which you can use to build your own Components App for io.Connect Desktop by using, modifying or replacing the available components and functionalities.

The following example demonstrates how to provide customized components for the Channel Selector and the dialogs apps of io.Connect Desktop:

import React, { Suspense, lazy } from "react";
import { RouterProvider, createHashRouter } from "react-router-dom";
import { IODialogs } from "@interopio/components-react";
// Using the default io.Connect themes.
import "@interopio/theme";

// Your custom Channel Selector.
const CustomChannelSelector = lazy(() =>
    import("./my-components/CustomChannelSelector")
);

// Your custom dialog component.
const CustomDialog = () => {
    const { DialogsProvider } = IODialogs;
    const Dialog = lazy(() => import("./my-components/CustomDialog"));

    return (
        <DialogsProvider>
            <Dialog />
        </DialogsProvider>
    );
};

const Loading = () => <div>Loading...</div>;

// Routes used by io.Connect Desktop for loading the system apps.
const routes = [
    {
        path: "channel-selector",
        element: <CustomChannelSelector />,
    },
    {
        path: "dialogs",
        element: <CustomDialog />,
    },
];

// By default, io.Connect Desktop loads its system apps from the file system.
// If your custom apps are hosted remotely, use `createBrowserRouter()` instead.
const router = createHashRouter(routes);

const App = () => {
    return (
        <Suspense fallback={<Loading />}>
            <RouterProvider router={router} />
        </Suspense>
    );
};

export default App;

To replace the default Components App of io.Connect Desktop, you must build your app and place it in the %LocalAppData%\interop.io\io.Connect Desktop\Desktop\assets\components folder.

Features

The @interopio/components-react library currently contains default components and hooks for the following io.Connect Desktop system apps:

License

MIT ©