1.0.0 • Published 1 year ago

alchemy-badge v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Alchemy Badge

Alchemy Badge is a customizable badge component for React that allows you to display information in a visually appealing manner. With Alchemy Badge, you can easily create badges with custom text, colors, and icons, making it perfect for displaying user information, status updates, or any other type of data.

Installation

To install Alchemy Badge, simply run the following command:

npm install alchemy-badge

Usage

To use Alchemy Badge in your React project, simply import the component and include it in your JSX code. Here's an example:

import React from 'react'
import AlchemyBadge from 'alchemy-badge'

function App() {
  const [alchemyBadge, setAlchemyBadge] = useState<AlchemyBadge>(null)

  useEffect(() => {
    const _alchemyBadge = new AlchemyBadge('xxxxxx')
    setAlchemyBadge(_alchemyBadge)
  }, [])
  
  return (
    <div>
      <a href="#">
        <img
          onClick={alchemyBadge?.logBadgeClick}
          id="badge-button"
          style={{ width: 240, height: 53 }}
          src="https://static.alchemyapi.io/images/marketing/badge.png"
          alt="Alchemy Supercharged"
        />
      </a>
    </div>
  )
}

export default App;

License

Alchemy Badge is MIT licensed.

1.0.0

1 year ago