1.0.2 • Published 2 years ago

@codeandtrust/ct-ui v1.0.2

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

ct-ui

Code /+/ Trust UI Components

NPM JavaScript Style Guide

Install

yarn add @codeandtrust/ct-ui

Usage

import { useState, useLayoutEffect } from "react"
import { LoadingButton } from '@codeandtrust/ct-ui'

const App = () => {
  const [isLoading, setIsLoading] = useState(false)

  const handleClick = () => {
    setIsLoading(true)
    setTimeout(() => {
      setIsLoading(false)
    }, 3000)
  }

  return <LoadingButton variant="contained" color="primary" loading={isLoading} onClick={handleClick}>Click me</LoadingButton>
}

License

MIT © jrdn91