Skip to content

[Question] Renaming theme object properties... #12

@didimedina

Description

@didimedina

I'm a bit thrown off by a specific behavior that occurs and I can't seem to pinpoint what's causing it.

I want to change the name of my theme object to something else, for example, space to spacers. Then in my components, I use useTheme() and assign padding values like spacers.tightest for example. For some reason when I do this and console.log the value it logs it correctly but the rendered value is way off. However, when I rename it to its suggested name in the theme object to space it works as expected. This is strange to me bec I'd assume according to system-ui's documentation that so long it gets a valid value the name is arbitrary.

Any insight on why this is happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions