0.0.6 β€’ Published 5 months ago

@gruve/echo v0.0.6

Weekly downloads
-
License
-
Repository
github
Last release
5 months ago

Gruve Event Widgets

GruveEventWidgets is a React component that lets you display and manage event ticket selections with minimal setup. It handles event display, ticket purchase flows, and supports custom styling and text via a single config prop.


πŸ“¦ Installation

npm install @gruve/echo

or

yarn add @gruve/echo

πŸš€ Usage

1. Render a styled button with custom text

If you provide config.displayText, the component will render a button with that text. Any children passed will be ignored in this mode.

import React from 'react'
import { GruveEventWidgets } from "@gruve/echo"

function App() {
  return (
    <div>
      <GruveEventWidgets
        eventAddress="0x1508DfF27C5BfFC5810976fBCB3************"
        isTest={true}
        config={{
          backgroundColor: "#3498db",
          color: "white",
          padding: "12px 24px",
          borderRadius: "6px",
          themeColor: "#e74c3c",
          displayText: "View Event",
        }}
      />
    </div>
  )
}

export default App

2. Render custom children content

If you omit config.displayText, the component will render whatever you pass as children instead of a default button.

import React from 'react'
import { GruveEventWidgets } from "@gruve/echo"

function App() {
  return (
    <div>
      <GruveEventWidgets
        eventAddress="0x1508DfF27C5BfFC5810976fBCB3************"
        config={{
          backgroundColor: "#2ecc71",
          themeColor: "#27ae60",
        }}
      >
        <button style={{ padding: '8px 16px' }}>
          Custom β€œJoin Now” Button
        </button>
        <p style={{ marginTop: '8px' }}>Extra info or custom UI here.</p>
      </GruveEventWidgets>
    </div>
  )
}

export default App

βš™οΈ Props

Prop NameTypeRequiredDescription
eventAddressstringβœ… YesThe unique identifier (address) of the event you want to display.
isTestbooleanNoWhen true, runs the widget in test/sandbox mode (skips real payment flows).
configReact.CSSProperties & { themeColor?: string; displayText?: string }NoOptional styling and text overrides. If you specify displayText, a button with that text is shown; otherwise, children are rendered.
childrenReact.ReactNodeNoCustom nodes to render only when config.displayText is not provided.

πŸ“ config properties

NameTypeRequiredDescription
CSS Propertiesstring / numberNoAny valid React CSS property (e.g., backgroundColor, color, padding, borderRadius).
themeColorstringNoA semantic theme color for internal use (e.g., hover states or progress bars).
displayTextstringNoIf provided, renders a button with this text. If omitted, the component will render its children instead.

πŸ“œ License

This project is licensed under the MIT License.
You are free to use, modify, and distribute this package for personal and commercial purposes.


🀝 Contributions

Contributions are welcome! Feel free to submit a pull request or open an issue if you encounter any bugs or want to add features.

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago