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

@breathecode/breathecode-react-components

v1.0.2

Published

Collection of usefull components for react.js applications around the BreatheCode ecosystem

Downloads

9

Readme

BreatheCode Platform JS Components

This is the main UI Library used in all BreatheCode interfaces based on react.

Note: This is a very early development library, please help us debug it.

Philosophy

The BreatheCode UX is based on Markdown, it mainly relys on typography to create a neat experience but with a very minimalis approach.

Instalation

  1. Install using npm
$ npm i @breathecode/breathecode-react-components --save
  1. Import any component that you want to use
import { Panel, DropLink } from '@breathecode/breathecode-react-components';

Component Table of Contents:

| Component | Description | |---------------|-------------------------------------------------------------------------------------------| | Button |Simple button | | Checkbox |It's a very simple checkbot | | Droplink |It's a minimalist bootstrap dropdown | | List |Just a list of stuff | | Loading |Loading animation | | MenuItem |Item on the left sidebar | | Modal |Show stuff in the center of the screen | | Notifier |Notifications in the top of the viewport | | Panel |To display a box with material design shadow level | | PrivateRoute |React Route that requiers autentication to display | | ProgressKPI |Small indicator of progress | | Sidebar |The Main Navegation component in BreatheCode's UI | | BreatheCrumb |Show the path were the user is standing and allos the user to go back to previous levels |

Actionable

A label that has a check on the right depending if its done or not.

| Demo | alt text | |---|----|

Properties

{
  label: PropTypes.string.isRequired,
  dropdown: PropTypes.array,
  isSelected: PropTypes.bool,
  onDropdownSelect: PropTypes.func.isRequired,
  type: PropTypes.oneOf(['lesson', 'replit', 'quiz', 'assignment']),
}
    <ActionableItem key={i} type={l.type} 
        done={(l.status === "done")} 
        label={(typeof l.title !== 'undefined') ? l.title : l.associated_slug} 
        dropdown={l.menu} 
        onDropdownSelect={(option)=>this.actionableSelected(l,option)} 
      />;

Checkbox

| Demo | alt text | |---|----|

Droplink

It displays a list of options when you click on it

| Demo | alt text | |---|----|

Usage

        <DropLink
            className='list_card' 
            dropdown={[
                { label: 'review students', slug: 'cohort_students', to: `/manage/student/?cohort=${data.slug}`},
                { label: 'change cohort stage', slug: 'change_stage', data: someData }
            ])}
            onSelect={(opt) => onEntitySelect(opt)}
        >
        Click me
        </DropLink>

List

It displays a ul with LIs or OLs depending on if it is ordered or not.

| Demo | alt text | |---|----|

    <List className="any-class" ordered={true}>
        <ActionableItem key={i} label="Make the bed" done={false} />
        <ActionableItem key={i} label="Make the bed" done={false} />
        <ActionableItem key={i} label="Make the bed" done={false} />
        <ActionableItem key={i} label="Make the bed" done={false} />
    </List>

Loading

Show or hides a loadbar on the center of the screen

| Demo | alt text | |---|----|

    <Loading show={true} />

Modal

| Demo | alt text | |---|----|

Notifier

Displays a notification message on the top of the screen, you can specify if you want your notification to prompt the user for confirmation or not.

| Demo | alt text | |---|----|

    let notifications = [{
        id: 1, //unique identifier
        msg: 'Are you sure you want to delete?', //message to display
        type: 'info', //info, error, success or warning
        onConfirm: confirm //this callback will be called on user confirmation 
    }];
    <Notifier notifications={notifications} />

PrivateRoute

It behaves like a normal react-router Route but with the addition that it redirects the user to /login if it loggedIn = false

    <BrowserRouter>
            <Switch>
                <Route exact path='/login' component={LoginView} />
                <PrivateRoute exact path='/' loggedIn={this.state.loggedIn} component={AnyPrivateView} />
                <Route render={() => (<p className="text-center mt-5">Not found</p>)} />
            </Switch>
        </div>
    </BrowserRouter>

ProgressKPI

Displays the percentage of progress from 0 to 100%

| Demo | alt text | |---|----|

    <ProgressKPI progress={76} />

Sidebar

| Demo | alt text | |---|----|

BreatheCrumb

| Demo | alt text | |---|----|