question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript: CSSReset: config prop is missing from type

See original GitHub issue

CodeSandbox: https://codesandbox.io/s/chakra-ts-starter-tmw03

The type for CSSReset is just React.FC without the generic for props.

My use case for wanting to configure CSSReset is to set a custom background color on body. Should there be a better way to configure this instead?

This came up a while ago here: https://github.com/chakra-ui/chakra-ui/issues/101#issuecomment-533213660

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
segunadebayocommented, Oct 3, 2019

Here’s the type def updates for CSSReset. What do you think?

interface Config {
  color: string;
  bg: string;
  borderColor: string;
  placeholderColor: string;
}

type ConfigReturnType = { light: Config; dark: Config };

type CSSResetProps = {
  config?: (
    theme: ITheme,
    defaultConfig?: ConfigReturnType,
  ) => ConfigReturnType;
};
2reactions
segunadebayocommented, Oct 9, 2019

I’ve released a patch for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript variant prop types missing with `createStitches ...
I have a monorepo where the theming is separate from other components. In the "theming" package I create a stitches instance with createStitches ......
Read more >
Property is missing in type error - reactjs - Stack Overflow
I am having an issue with working through a demo React project. Most of the issues stem from me trying to implement it...
Read more >
Features | Vite
Vite uses esbuild to transpile TypeScript into JavaScript which is about 20~30x ... If the project contains valid PostCSS config (any format supported...
Read more >
visibility - CSS: Cascading Style Sheets - MDN Web Docs
The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or...
Read more >
Docs • Svelte
Complete documentation for Svelte.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found