hashicon icon indicating copy to clipboard operation
hashicon copied to clipboard

Add example usage of params for React

Open nathanlambert opened this issue 2 years ago • 2 comments

I couldn't see an easy way to use params in react. Could you provide an example? 🙏🏼

I wanted to modify light to make the 3d effect more pronounced.

nathanlambert avatar May 11 '22 18:05 nathanlambert

It should be options attribute, like <Hashicon value={value} options={{light: {enabled: true}}}/>. You can check the sources here: https://github.com/emeraldpay/hashicon/blob/master/packages/hashicon-react/src/component.tsx

splix avatar May 12 '22 16:05 splix

Hmmm that's exactly what I tried, but the TS compiler was complaining. It won't accept partial options. I looked in the hashicon-react repo for default options that I could spread before the light option but couldn't find it.

nathanlambert avatar May 12 '22 18:05 nathanlambert