Closed codeheart09 closed 1 year ago
Hey @codeheart09 - it is indeed a strange type (and probably something we should move away from / have a separate token for), but this is how it's currently implemented (in JS): https://github.com/segmentio/evergreen/blob/master/src/themes/default/tokens/shadows.js#L10-L18
Unfortunately I think you'll need to cast the shadows
array, regardless of whether you want to override the focusRing
value:
import { Theme } from "evergreen-ui";
const shadows: Theme["shadows"] = [...] as Theme["shadows"]
Once it has been cast, you should be able to assign the focusRing
property as well..
shadows.focusRing = "red";
So, I'm trying to customize the
shadows
property of the theme. For that I created the object to merge with the defaultTheme.But when I apply this to the
ThemeProvider
I get:I'm not sure how can I merge a string array with an object. This may be a silly thing, but this is indeed the expected goal? How would I do that?
Thanks for any help.