Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@kadena/react-components] When bootstrapping the react-components the baseGlobalStyles produces a type error #207

Open
EnoF opened this issue Apr 5, 2023 · 1 comment

Comments

@EnoF
Copy link
Contributor

EnoF commented Apr 5, 2023

Describe the bug
When bootstrapping the react-components the baseGlobalStyles produces a type error:

error| TS2345: Argument of type 'Record<string, unknown>' is not assignable to parameter of type '{ '@import'?: unknown; '@font-face'?: unknown; } & { [x: string]: CSS<{}, { colors: { background: "Gainsboro"; fontColor: "Gainsboro"; gray500: "DarkSlateGray"; blue500: "SteelBlue"; purple500: "RebeccaPurple"; green500: "DarkGreen"; red500: "DarkRed"; }; ... 6 more ...; sizes: { ...; }; }, DefaultThemeMap, { ...; }...'. Type 'Record<string, unknown>' is not assignable to type '{ [x: string]: CSS<{}, { colors: { background: "Gainsboro"; fontColor: "Gainsboro"; gray500: "DarkSlateGray"; blue500: "SteelBlue"; purple500: "RebeccaPurple"; green500: "DarkGreen"; red500: "DarkRed"; }; ... 6 more ...; sizes: { ...; }; }, DefaultThemeMap, { ...; }>; }'. 'string' index signatures are incompatible. Type 'unknown' is not assignable to type 'CSS<{}, { colors: { background: "Gainsboro"; fontColor: "Gainsboro"; gray500: "DarkSlateGray"; blue500: "SteelBlue"; purple500: "RebeccaPurple"; green500: "DarkGr

To Reproduce
When initializing the globalStyles and providing the baseGlobalStyles to globalCss we receive the above mentioned type error.

import "./globals.css";
import {
  getCssText,
  globalCss,
  baseGlobalStyles,
} from "@kadena/react-components";

const globalStyles = globalCss(baseGlobalStyles);

globalStyles();

Expected behavior
No type error

Desktop (please complete the following information):

  • OS: Linux
  • TSC: 4.9.5
@eileenmguo eileenmguo changed the title When bootstrapping the react-components the baseGlobalStyles produces a type error [@kadena/react-components] When bootstrapping the react-components the baseGlobalStyles produces a type error Apr 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2023

This issue is stale because it is open for 60 days with no activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant