Questions tagged [linaria]

6 questions
3
votes
0 answers

Analyzing the performance of emotion/css-in-js in our app

While emotion is great for the developer experience, it does have an affect on how the speed of an application. This article serves as a great reference:…
1
vote
0 answers

How to make linaria work with turbo repo and next js?

To set up linaria with next js we can use next-linaria package as shown in with-linaria example. Setting up next js for linaria, we can do npx create-next-app -e with-linaria. However, I get trouble in adding linaria to the ui package in a turbo…
Mayank Kumar Chaudhari
  • 16,027
  • 10
  • 55
  • 122
0
votes
0 answers

Setting up Linaria with Next.js for SSR pages

I am using "linaria": "^4.1.10" and "next-linaria": "^0.11.0" in my Next.js app. I have followed the configuration on this repo. In my app the pages which are not using getServerSideProps are working fine with above configuration, but the pages…
shivamragnar
  • 383
  • 2
  • 10
0
votes
0 answers

Is there a way to get a React JSX element's style attribute to recognise a CSS custom property?

The Linaria documentation here claims that the following should be possible export function Box({ size }) { return (
); } However, the compiler justifiably errors like…
Joseph Beuys' Mum
  • 2,395
  • 2
  • 24
  • 50
0
votes
1 answer

Type 'undefined' is not assignable to type '"default" | "red" | "green" | "blue"

I am using React and TypeScript in my app. How do I get rid of below error? import { styled } from "linaria/react"; type Color = { color: "default" | "red" | "green" | "blue"; }; const handleColorType = ({ color }: Color) => { switch (color)…
meez
  • 3,783
  • 5
  • 37
  • 91
0
votes
0 answers

Linaria + Next.js + Path Aliases

I wanted to give Linaria (utilizing next-linaria) a try, but I'm currently stuck to get it working in any of my Next.js projects (that also use Typescript by the way). The root of evil seems to be path aliases that are supported by Next.js by…
K. D.
  • 4,041
  • 9
  • 48
  • 72