0.1.2 • Published 3 years ago

@sc-components/button v0.1.2

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

Button Component

Base button component for use in SolidJS applications.

Installation

pnpm install @sc-components/button

Usage

import { Button } from '@sc-components/button';

export default function App() {
  return (
    <Button>Click Me</Button>
  );
}

Acceptable Props

enum Type {
  Primary = 'primary',
  Info = 'info',
  Warn = 'warn',
  Error = 'error',
}

interface Props {
  // button type
  type?: Type
  // button children
  children: JSX.Element
  // onClick handler
  onClick?: () => void
}