1.0.0 • Published 3 years ago

@shapla/react-chip v1.0.0

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

Shapla React Button

A simple button, in different colors, sizes, and states

Table of contents

Installation

npm install --save @shapla/react-chip

Usage

Styles

with Sass:

import '@shapla/react-chip/src/index.scss';

with CSS:

import '@shapla/react-chip/dist/chip.css';

Javascript Instantiation

import React from 'react';
import Chip from '@shapla/react-chip';

class MyApp extends React.Component {
  render() {
    return (
      <Chip text='Sayful Islam' deletable={true} onDeleteIconClick={() => console.log('delete')}/>
    );
  }
}

Props

PropertyTypeRequiredDefaultDescription
textStringno | Chip text
imageSrcStringno | Chip contact image url
deletableBooleannofalseIf set true, Delete icon will appear
smallBooleannofalseIf set true, a small chip with display
heightStringno32pxCustom height of chip
onDeleteIconClickStringno32pxTrigger when you click on delete icon.