0.12.8 • Published 18 days ago

@cypress-design/react-button v0.12.8

Weekly downloads
-
License
MIT
Repository
-
Last release
18 days ago

Button

Install

npm install @cypress-design/react-button

or with yarn

yarn add @cypress-design/react-button

Usage

import Button from '@cypress-design/react-button'
import { IconActionPower } from '@cypress-design/react-icon'
import Button from '@cypress-design/react-button'
export default () => (
  <Button>
    <IconActionPower className="mr-2" />
    Button
  </Button>
)

Square buttons

import { IconActionPower } from '@cypress-design/react-icon'
import Button from '@cypress-design/react-button'
export default () => (
  <div className="flex gap-4 items-center">
    {[20, 24, 32, 40, 48].map((size) => (
      <Button key={size} size={size} square>
        <IconActionPower
          style={{ width: `${size / 2}px`, height: `${size / 2}px` }}
        />
      </Button>
    ))}
  </div>
)

Possible variants

import {
  default as Button,
  VariantClassesTable,
  SizeClassesTable,
} from '@cypress-design/react-button'

export default () => {
  return (
    <div className="flex flex-wrap justify-stretch gap-[8px]">
      {Object.keys(VariantClassesTable).map((variant) => (
        <div
          key={variant}
          className="px-[8px] py-[12px] flex flex-col items-center gap-[16px] rounded min-w-[180px]"
          style={{
            backgroundColor: variant === 'outline-dark' ? '#1a202c' : 'white',
            color: variant === 'outline-dark' ? 'white' : 'black',
          }}
        >
          {variant}
          {Object.keys(SizeClassesTable).map((size) => (
            <div key={size} className="flex gap-[8px] items-center">
              {size}
              <Button variant={variant} size={size}>
                Button
              </Button>
            </div>
          ))}
        </div>
      ))}
    </div>
  )
}
0.12.8

18 days ago

0.12.7

19 days ago

0.12.6

20 days ago

0.12.5

1 month ago

0.12.4

3 months ago

0.12.1

4 months ago

0.12.2

4 months ago

0.12.3

4 months ago

0.12.0

4 months ago

0.11.2

10 months ago

0.10.0

1 year ago

0.11.0

12 months ago

0.10.1

1 year ago

0.11.1

12 months ago

0.10.2

1 year ago

0.10.3

12 months ago

0.9.0

1 year ago

0.8.1

1 year ago

0.9.1

1 year ago

0.8.2

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago