tokenami / tokenami/tokenami

make changes to enable moving `TokenamiPropertiesPick/Omit` to public facing APIs

Open
#385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: medium
Dominant language
TypeScript
Stars
1k
Forks
10
Avg merge
12h 47m
Merged PRs (30d)
4

Description

the css utility use case is intended to be similar to tailwind-merge, so the idea is that it would only be used when merging style rules (and directly on native elements).

the rest of the codebase can style in the style attribute directly if the component uses the TokenamiStyle type to enable tokenami properties on that component.

atm, that type also allows the css utility to be passed to the style attribute which is fine rn, but i'd like to expose the TokenamiPropertiesPick and TokenamiPropertiesOmit types so that consumers can narrow the properties their component accepts.

the TokenamiCSS type returned by the css utility is effectively {} which bypasses any type checking, so passing it to a comp with narrowed properties would be allowed. this aims to improve that type checking experience.

try to get TokenamiCSS to infer the returned properties. i already attempted that and it opened a can of worms but perhaps a fresh set of eyes can crack it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing the public type definitions for TokenamiCSS, TokenamiPropertiesPick, and TokenamiPropertiesOmit, then reproduce the interaction between the css utility and a component with narrowed style properties. Done means TokenamiCSS infers its returned properties and narrowed components reject incompatible values.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.