This package has been deprecated

Author message:

this package has been deprecated

@zecos/propz

0.0.3 • Public • Published

propz

propz is a fairly simple library that simply returns commonly used props given a fieldName, state, and actions.

Mostly meant for combined use with @zecos/ui.

Example Usage

import { propz } from 'propz'

const Form = () => {
  const [state, actions] = useFieldz({username: {init: ""}})
  const props = propz({fieldName: "username", state, actions})
  return (
    <form>
    <input {...props} />
    </form>
  )
}

This will use the fieldName property to generate commonly used props like

  • id (kebab-case)
  • name (kebab-case)
  • label (Title Case)
  • aria-label (Title Case)

It uses the state and actions properties to generate

  • value
  • onChange
  • onBlur

Readme

Keywords

none

Package Sidebar

Install

npm i @zecos/propz

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

7.75 kB

Total Files

9

Last publish

Collaborators

  • zwhitchcox