0.4.12 • Published 3 years ago

dvorakchen-components v0.4.12

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

dvorakchen-components

There are some compenents for React.

Now support:

  • Button
  • Input
  • CheckBox

Not support:

CHANGE THEME!

I was try to make this components with first Utility-First Fundamentals, like Tailwindcss.

At last, that is not good at making components I thought.

Installation

npm i dvorakchen-components

Usage

Button

import { Button } from "dvorakchen-components";

<Button>Submit</Button>;

pass the props to it like primitive button

<Button onClick={() => {}}>Submit</Button>

select color, pass primary or secondary or nothing

<Button primary>Primary Button</Button>
<Button secordary>Secondary Button</Button>
<Button>General Button</Button>

Input

import { Input } from "dvorakchen-components";

<Input />;

label prefix

<Input label="TEXT" />

CheckBox

import { CheckBox } from "dvorakchen-components";

<CheckBox>
  <CheckBox.Item label="LABEL_1" defaultChecked defaultValue="ON" />
  <CheckBox.Item label="LABEL_2" defaultValue="OFF" />
</CheckBox>;

Selector

import { Selector } from "dvorakchen-components";

const DATA = [
  {
    key: "1111",
    value: "先择",
  },
  {
    key: "1122",
    value: "拜入",
  },
];
const PLACEHOLDER = "未选择";
<Selector dataSource={DATA} placeholder={PLACEHOLDER} />;

RadioGroup

import { RadioGroup } from "dvorakchen-components";

const DATA = [
  { key: "1", value: "确认" },
  { key: "2", value: "取消" },
];
function handleChange(item) {}
<RadioGroup dataSource={DATA} onChange={handleChange} />;
0.4.12

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.2.10

3 years ago

0.1.10

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago