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

release-contracts-ui-components

v2.0.2

Published

This little library is meant to speed up the UI development process of react applications. It contains a set of self contained UI elements which can be used for any project via NPM.

Downloads

3

Readme

release-contracts-ui-components

This little library is meant to speed up the UI development process of react applications. It contains a set of self contained UI elements which can be used for any project via NPM.

NPM JavaScript Style Guide npm version

Install ui library and it's peer dependencies

yarn add --save release-contracts-ui-components @material-ui/icons @material-ui/core formik 

Add the fonts and icons of material-ui to your index.html

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />

setup seed data to build up a form inside a /seed/index.jx file with correct structure

// ./seed/index.js

import * as yup from 'yup'

const seed = [{ <-- important: each object in the array represents an input field in the form
  id: 'identifier', <-- important: this name is being used to setup the initial values for formik state
  name: 'identifier',
  label: 'Email',
  type: 'email',
  placeholder: 'Email',
  autoComplete: 'email'
}, {
  id: 'password',
  name: 'password',
  label: 'Wachtwoord',
  type: 'password',
  placeholder: '********',
  autoComplete: 'current-password',
  helperText: 'Wachtwoord vergeten?'
}]

const loginValidationSchema = yup.object().shape({
  identifier: yup
    .string()
    .email()
    .required('Email must be filled in'),
  password: yup
    .string()
    .min(0)
    .required('Password is required')
})

export { seed, validationSchema }

Currently we are only supporting input type text fields. In the next release more to come

Usage

import React, { Component } from 'react'

import { CustomForm } from 'release-contracts-ui-components'
import { seed } from './seed'

class Example extends Component {
  render () {
    return (
      {/* This creates a form with 2 fields: username and password. It also contains a custom onSubmit callback */}
      <Form title='form title' fields={seed} validationSchema={validationSchema} onSubmit={() => console.log('submitting')} />
    )
  }
}

Supported Components


| Props | Type | Limitations | isRequired | ------------- |:-------------:| -----:| -----:| | Title | string | only-strings | true | subTitle | string | only-strings | fales | fields | object | only-object | true | validationSchema | object | only-object | true | onSubmit | func | only-function | true

| Props | Type | Limitations | isRequired | ------------- |:-------------:| -----:| -----:| | Title | string | only-strings | true | color | string | only-strings | false | inhertis all material-ui props | material-ui API | see docs | false

| Props | Type | Limitations | isRequired | ------------- |:-------------:| -----:| -----:| | Title | string | only-strings | true | loading | bool | only-boolean | true | type | string | only-string | true (will change in next major) | disabled | bool | only-boolean | false | color | string | only-string | false

| Props | Type | Limitations | isRequired | ------------- |:-------------:| -----:| -----:| | Title | string | only-strings | true | inhertis all material-ui props | material-ui API | see docs | false

License

MIT © [Kevin Vugts](https://github.com/Kevin Vugts)