trufflesuite / drizzle-react-components-legacy

A set of useful components for common dapp UI elements.
96 stars 70 forks source link

Allow passing custom component #70

Closed macsj200 closed 5 years ago

macsj200 commented 5 years ago

Allow the user to specify a component to render the displayData fetched by <ContractData>

// A custom component, currently just stringifies data
const Custom = ({ displayData } : any) => (
  <div>
    <h3>custom</h3>
    {displayData.toString()}
  </div>
)

<ContractData ... customComponent={Custom} />
honestbonsai commented 5 years ago

Closing since #81 was merged.