emeraldpay / hashicon

Generates a beautiful representation of any hash.
Apache License 2.0
191 stars 22 forks source link

Add example usage of params for React #36

Open nathanlambert opened 2 years ago

nathanlambert commented 2 years ago

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.

splix commented 2 years ago

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

nathanlambert commented 2 years ago

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.