1.0.9 • Published 2 years ago

opolis-components v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

opolis-components

Reusable TypeScript/React/Tailwind components for building web apps

NPM JavaScript Style Guide

Install

yarn add opolis-components

or

npm install --save opolis-components

Usage

import { Header, FormRow } from "opolis-components";
import 'opolis-components/dist/index.css'

const HeaderLinks = () => (
  <nav>
    <ul className='flex text-white gap-x-2'>
      {['link 1', 'link 2', 'link 3'].map((link, index) => (
        <li key={`link-${index}`}>
          <Link to='javascript:void(0)' title={link}>
            {link}
          </Link>
        </li>
      ))}
    </ul>
  </nav>
)

const options = [
    {
      VALUE: '',
      LABEL: 'Select…'
    },
    {
      LABEL: 'Option 1',
      VALUE: 'Option 1'
    },
    {
      LABEL: 'Option 2',
      VALUE: 'Option 2'
    }
  ]

export const HeaderTest = () => (
  <>
    <Header
      backgroundColor='orange'
      headerLinks={<HeaderLinks />}
    />

    <fieldset>
      <FormRow type="text" labelText="My Label" />
      <FormRow
        type='select'
        options={options}
        fieldName='field1'
        labelText='Choose an option'
      />
    </fieldset>
  </>

License

MIT © antibland

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago