Skip to content

How to map theme to properties #10

@alaboudi

Description

@alaboudi

Thank you for this spec. I have been working on a side project that utilizes a theme with a shape similar to that in this spec. The one challenge I have is determining a systemic way to map values from the theme to styles in my React component library. I unfortunately do a lot of guess work. This is especially true when using values that are part of an array field (ex. sizes, space, etc).

Do you think it would beneficial to be more explicit about what each value in the array index would map to? For example, do you think we can benefit from saying something like theme.space[2] will map to things like button paddings?

The main reason I bring this up is because I'm assuming that my guesswork really beats the point behind using this theme spec. It would be unfortunate if someone was designing a spec but the components did not map them in the way they had in mind.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions