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

test-my-component

v1.0.3

Published

Made with create-react-library

Downloads

2

Readme

@stackbyhq/stackby-ui-component

Made with create-react-library

NPM JavaScript Style Guide

Features

  • configurable via props
  • Controllable state props and modular architecture
  • Flexible approach to data, with customisable functions
  • auto position
  • small bundle size

Installation and usage

npm install --save @stackbyhq/stackby-ui-component

Select Usage

import React from 'react';
import { Select } from '@stackbyhq/stackby-ui-component';
import '@stackbyhq/stackby-ui-component/dist/index.css'

const options = [
    { label: "chocolate", value: 'chocolate', id: 1, color: "#000000" },
    { label: "strawberry", value: 'strawberry', id: 2, color: "#FFEB3B" },
    { label: "vanilla", value: 'vanilla', id: 3, color: "#FD823E" },
    { label: "Banana", value: 'Banana', id: 4, color: "#8BC34A" },
    { label: "Mango", value: 'Mango', id: 5, color: "#FFEB3B" },
];

const collaboratorOptions = [
    { label: "chocolate", value: 'chocolate', id: 1, profileImage: "" },
    { label: "strawberry", value: 'strawberry', id: 2, profileImage: "" },
    { label: "vanilla", value: 'vanilla', id: 3, profileImage: "" },
    { label: "Banana", value: 'Banana', id: 4, profileImage: "" },
    { label: "Mango", value: 'Mango', id: 5, profileImage: "" },
];

class App extends React.Components {
  state = {
    selectedOption: [],
    // selectOption:  [{ label: "chocolate", value: 'chocolate', id: 1, color: "#000000" }]
    // selectCollaborator:  [{ label: "chocolate", value: 'chocolate', id: 1, profileImage: "" }]
  };

  handleChange = selectedOption => {
    this.setState({ selectedOption });
    console.log(`Option selected:`, selectedOption);
  };

  render() {
    const { selectedOption } = this.state;

    return (
      <div>
         // select
        <Select
          value={selectOption}
          onChange={this.handleChange}
          option={options}
          type ='select'
          className= {'myClass'}
         />

         // Multi Select
        <Select
          value={selectOption}
          onChange={this.handleChange}
          option={options}
          type ='multiSelect'
         />

         // collaborator
        <Select
          value={selectCollaborator}
          onChange={this.handleChange}
          option={collaboratorOptions}
          type ='collaborator'
          setInviteNewCollaborator ={this.handleChange}
         />

         // Multi Collaborator
        <Select
          value={selectCollaborator}
          onChange={this.handleChange}
          option={collaboratorOptions}
          type ='multiCollaborator'
          setInviteNewCollaborator ={this.handleChange}
         />
      </div>
    );
  }
}

Props

Common props you may want to specify include:

  • onChange - subscribe to change events
  • setInviteNewCollaborator - invite new collaborator
  • option - specify the options the user can select from
  • value - control the current value
  • type - select, multiSelect, collaborator, multiCollaborator
  • className - add customer class

Rating Usage

import React from 'react';
import { Rating } from '@stackbyhq/stackby-ui-component';
import '@stackbyhq/stackby-ui-component/dist/index.css'

class App extends React.Components {
  state = {
    defaultValue: 2,
  };

  handleChange = ratingValue => {
    console.log(`Collaborator selected:`, ratingValue);
  };

  render() {
    const { defaultValue } = this.state;

    return (
      <div>
         <Rating value={defaultValue}
              stop={5} 
              onChange={this.handleChange} 
              className = {'myClassName'} >
         </Rating>
      </div>
    );
  }
}

Props

Common props you may want to specify include:

  • onChange - subscribe to change events
  • value - control the current value
  • className - add customer class

Checkbox Usage

import React from 'react';
import { Checkbox } from '@stackbyhq/stackby-ui-component';
import '@stackbyhq/stackby-ui-component/dist/index.css'

class App extends React.Components {
  state = {
    defaultValue: true,
  };

  handleChange = checkboxValue => {
    console.log(`checkbox selected:`, checkboxValue);
  };

  render() {
    const { defaultValue } = this.state;

    return (
      <div>
         <Checkbox checked={defaultValue} 
             onChange={this.handleChange} 
             className={'myClassName'}>
         </Checkbox>
      </div>
    );
  }
}

Props

Common props you may want to specify include:

  • onChange - subscribe to change events
  • checked - control the value is checked or not
  • className - add customer class

DatePicker Usage

import React from 'react';
import { DatePicker } from '@stackbyhq/stackby-ui-component';
import '@stackbyhq/stackby-ui-component/dist/index.css'

class App extends React.Components {
  state = {
    defaultValue: '25/10/2021',
  };

  handleChangeDatePicker = Value => {
    console.log(`DatePicker time stamp `, Value);
    console.log("DatePicker date object", new Date(data));
  };

  render() {
    const { defaultValue } = this.state;
    return (
      <div>
         <DatePicker value={defaultValue} 
              onChange={handleChangeDatePicker}
              className = {'myClassName'}>
         </DatePicker>
      </div>
    );
  }
}

Props

Common props you may want to specify include:

  • onChange - subscribe to change events
  • value - control the current value
  • className - add customer class

LongText Usage

import React from 'react';
import { LongText } from '@stackbyhq/stackby-ui-component';
import '@stackbyhq/stackby-ui-component/dist/index.css'

class App extends React.Components {
  state = {
    defaultValue: '',
  };

  handleChange = Value => {
    console.log(`LongText `, Value);
  };

  render() {
    const { defaultValue } = this.state;

    return (
      <div>
         <LongText value={defaultValue} isMarkDown={true} 
             onChange={this.handleChange} 
             textareaHeight={100}
             modalHeight={100}
             isModel={true}
             modalWidth={300}>
         </LongText>
      </div>
    );
  }
}

Props

Common props you may want to specify include:

  • onChange - subscribe to change events
  • value - control the current value
  • isMarkDown: boolean - enable markdown for true
  • isModel: boolean - open with model popup.

License

MIT © Stackbydev