jantimon / next-yak

a streamlined CSS-in-JS solution tailor-made for Next.js, seamlessly combining the expressive power of styled-components syntax with efficient build-time extraction and minimal runtime footprint, ensuring optimal performance and easy integration with existing atomic CSS frameworks like Tailwind CSS
https://yak.js.org
118 stars 4 forks source link

add square-bracket-support #66

Closed jantimon closed 8 months ago

jantimon commented 8 months ago

we got a request to support numeric indexes for yak files e.g.:

import { spacings } from "./constants.yak";

const Button = styled.button`
   margin: ${spacings[0]}
`

this pr uses recursions to allow any combination of computed and uncomputed member expressions like for example:

a.usage["of"][5].member.expressions

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yacijs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2024 8:40am
codspeed-hq[bot] commented 8 months ago

CodSpeed Performance Report

Merging #66 will not alter performance

:warning: No base runs were found

Falling back to comparing square-bracket-support (22ddff4) with main (64cacab)

Summary

✅ 2 untouched benchmarks