Buttons

The primary export of the Subbi react library are various web3 aware buttons that you can use to accept subscriptions. Each type of button share the following properties:

style (optional): A standard CSS-in-JS style, as seen here. Because Subbi uses styled-components under the hood, this includes pseudo elements.

onError (optional): An optional function that is called if any of the components encounter an error. It is passed one argument: the error object in question.

interface Props {
    style?: {
      [x: string]: string | number | {};
    } & React.CSSProperties;
    onError?: (error: any) => void | Promise<void>; 
}

Last updated