0.0.4 • Published 7 years ago

@klondike/ui-preact v0.0.4

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
7 years ago

ui-preact

Styleless Preact UI components

NPM Version Linux Build Test Coverage

Install

npm

npm i -S @klondike/ui-preact

yarn

yarn add @klondike/ui-preact

Direct Usage

Here is a quick example to get you started, it's all you need:

import { render } from 'preact';
import { Button } from '@klondike/ui-preact';

function App() {
  return (
    <Button>
      Get Started
    </Button>
  );
}

render(<App />, document.querySelector('#app'));

Extending Components

Here is an example of extending a component:

import { render } from 'preact';
import { Button } from '@klondike/ui-preact';

const LoudButton = ({ children, ...props }) => (
	<Button className="Button-loud" {...props}>{ children }</Button>
);

function App() {
  return (
    <LoudButton>
      Get Crackin!
    </LoudButton>
  );
}

render(<App />, document.querySelector('#app'));

License

MIT

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago