1.0.12 • Published 3 years ago

native-x-button v1.0.12

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

native-x-button

semantic-release

This helps you add interactive buttons. This module works with native-x-theme package.

Install

Yarn

yarn add native-x-button

NPM

npm install native-x-button

Usage

import { Button } from 'native-x-button'

function MyComponent() {
  return (
    <Stack>
      <Button>Click Me</Button>
      <Button outline>Click Me</Button>
      <Button clear>Click Me</Button>
      ...
      <Button rounded>Click Me</Button>
      <Button rounded outline>
        Click Me
      </Button>
      ...
      <Button loading>Click Me</Button>
      <Button rounded loading>
        Click Me
      </Button>
      <Button icon={<Icon name='trash' />}>Delete</Button>
    </Stack>
  )
}

DEMO

Button TypesButton SizesColors / Disabled
DEMO1DEMO2DEMO3

API

PropertyDefault ValueUsage
disabled?: booleanfalseDisable the user interaction and change visual appearance
outline?: booleanfalseButton with no background but with border color
clear?: booleanfalseButton with no background and border color
rounded?: booleanfalseShow rounded corners
loading?: booleanfalseShow a spinner
icon?: ReactNodeShow an icon
size?: string'normal'Valid values: 'x-small', 'small', 'normal', 'large', 'x-large'
backgroundColor?: stringCOLOR.ACCENTAny valid name of the color defined by ThemeProvider
textColor?: stringCOLOR.PRIMARYAny valid name of the color defined by ThemeProvider
borderColor?: stringCOLOR.DIVIDERAny valid name of the color defined by ThemeProvider
fill?: booleanFill the container horizontally and vertically
fillHorizontal?: booleanFill the container horizontally
width?: numberWidth of the button
height?: numberHeight of the button
minWidth?: numberMinimum width of the button
minHeight?: numberMinimum height of the button
maxWidth?: numberMaximum width of the button
maxHeight?: numberMaximum height of the button
onTap: (data: TData) => voidAction handler for user interaction
data: TDataundefinedOptional data

Automatic Release

Here is an example of the release type that will be done based on a commit messages:

Commit messageRelease type
fix: commentPatch Release
feat: commentMinor Feature Release
perf: commentMajor Feature Release
doc: commentNo Release
refactor: commentNo Release
chore: commentNo Release
1.0.11

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago