1.0.0-rc.26 • Published 5 months ago

@suada/react v1.0.0-rc.26

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

@suada/react

React components for Suada's integration management system. This package provides React-specific implementations of Suada's integration UI components.

Installation

npm install @suada/react

Usage

import { IntegrationManager } from '@suada/react';

function App() {
  return (
    <IntegrationManager
      config={{
        apiKey: 'your-api-key',
        externalUserIdentifier: 'user-123',
        gridColumns: 3,
        onIntegrationConnected: (integration) => {
          console.log(`${integration} connected`);
        },
        onIntegrationDisconnected: (integration) => {
          console.log(`${integration} disconnected`);
        }
      }}
    />
  );
}

Components

IntegrationManager

The main component for managing integrations. Displays a list of available integrations and their current status.

IntegrationCard

A standalone component for displaying a single integration with its status and controls.

Props

IntegrationManager Props

PropTypeRequiredDescription
configSuadaIntegrationsConfigYesConfiguration object for the integration manager
classNamestringNoAdditional CSS class name
styleReact.CSSPropertiesNoAdditional inline styles

Configuration Options

OptionTypeRequiredDefaultDescription
apiKeystringYes-Your Suada API key
externalUserIdentifierstringYes-Identifier for the user
baseUrlstringNoSuada API URLCustom API URL if needed
themeobjectNoDefault themeCustom theme options
size'small' \| 'medium' \| 'large'No'medium'Size of the component
gridColumnsnumberNo3Number of columns in the integration grid
enabledIntegrationsstring[]NoAll integrationsList of integration types to enable
onIntegrationConnectedfunctionNo-Callback when integration is connected
onIntegrationDisconnectedfunctionNo-Callback when integration is disconnected
onErrorfunctionNo-Callback when an error occurs

IntegrationCard Props

PropTypeRequiredDescription
integrationIntegrationYesIntegration details
statusIntegrationStatusYesCurrent status of the integration
configSuadaIntegrationsConfigYesConfiguration object
classNamestringNoAdditional CSS class name
styleReact.CSSPropertiesNoAdditional inline styles

Development

# Install dependencies
npm install

# Run tests
npm test

# Build the package
npm run build

# Run linting
npm run lint

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

1.0.0-rc.20

5 months ago

1.0.0-rc.24

5 months ago

1.0.0-rc.23

5 months ago

1.0.0-rc.22

5 months ago

1.0.0-rc.21

5 months ago

1.0.0-rc.26

5 months ago

1.0.0-rc.25

5 months ago

1.0.0-rc.13

6 months ago

1.0.0-rc.12

6 months ago

1.0.0-rc.11

6 months ago

1.0.0-rc.10

6 months ago

1.0.0-rc.17

6 months ago

1.0.0-rc.16

6 months ago

1.0.0-rc.15

6 months ago

1.0.0-rc.14

6 months ago

1.0.0-rc.19

6 months ago

1.0.0-rc.18

6 months ago

1.0.0-rc.9

6 months ago

1.0.0-rc.7

6 months ago

1.0.0-rc.8

6 months ago

1.0.0-rc.6

6 months ago

1.0.0-rc.5

6 months ago

1.0.0-rc.4

6 months ago

1.0.0-rc.3

6 months ago

1.0.0-rc.2

6 months ago

1.0.0-rc.1

6 months ago

1.0.0

6 months ago