Skip to content

[FEATURE] Make a true gradual adoption API #116

@MatteuSan

Description

@MatteuSan

Detailed Description

Make the gradual adoption API more... well... gradual.
Let the design tokens be imported like querying a GraphQL API; Making it possible to just get the right amount of design tokens for a project.

Context

I saw this code snippet from the tailwind config of clubs.

// tailwind.config.js
const {
  theme: { colors, fontFamily },
} = require('@devprotocol/hashi/gradual')

And I thought it would be pretty cool if this sort of API was implemented first-class in the gradual adoption feature instead of making the code hacky.

Possible implementation

API Proposal:

const { colors, fontFamily } = require('@devprotocol/hashi/gradual');

Also, provide auto-completion through the Tailwind 3.1 types, or through custom JSDoc blocks, or through Typescript type declaration files.

Additional information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions