trufflesuite / drizzle-react-components-legacy

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

Customization #69

Closed macsj200 closed 5 years ago

macsj200 commented 5 years ago

I'm quite impressed with how easy it is to use this package to read and write values from a smart contract. That being said, the default view that the component provides isn't what I'm looking for.

Is there any way to customize the output of <ContractData>?

honestbonsai commented 5 years ago

@macsj200 Can you provide an example of what you're looking for? Or an ideal API for this customization that you're looking for?

macsj200 commented 5 years ago

Hi, thanks for the quick reply. I actually made a pull request for allowing the feature I'm asking for.

Basically, I'm wondering if instead of having <ContractData> do the rendering itself (spit out <li>'s for example), what if we could pass in another component and use that custom component to render the actual data?

I tried to test my PR, but I was running into build issues using local copies of npm packages. Specifically, I was trying to yarn link the package, but my build was complaining that it could no longer find drizzle-react-components even though the symlink was in node_modules/.

tagging @wesleyfsmith

honestbonsai commented 5 years ago

@macsj200 Try using npm link and test it again. Would be nice if you could provide an example of this in the 2 test-apps that are bundled in this repo as well.

honestbonsai commented 5 years ago

Closing in favor of #80, which was closed by #81