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

[Bug] Theme type is wrong #179

Open
uladzimir-miadzinski opened this issue Feb 1, 2024 · 1 comment
Open

[Bug] Theme type is wrong #179

uladzimir-miadzinski opened this issue Feb 1, 2024 · 1 comment
Labels

Comments

@uladzimir-miadzinski
Copy link

uladzimir-miadzinski commented Feb 1, 2024

Describe the bug

It is impossible to override themes using "theme" attribute because of bug in types

Steps to reproduce the behavior

  1. Install latest 6.0.2
  2. Copy example from your docs https://www.npmjs.com/package/react-inspector#theme
import { chromeLight } from 'react-inspector'

<Inspector theme={{...chromeLight, ...({ TREENODE_PADDING_LEFT: 20 })}} data={{a: 'a', b: 'b'}}/>
  1. Add table={false} because now it is required attribute.
  2. See error that theme should be of type "string"

Expected behavior

Theme of type string | Record<string, string | number> | undefined.

Screenshots and/or logs

image

Environment

  • OS: Windows 10 x64
  • Node.js version: 20.10.0
  • NPM version: 10.2.3
  • Browser (if applicable): Latest Chrome

Additional context

p.s. the same happens if we try to use ObjectInspector

@sethjuarez
Copy link

Any thoughts on this one? I've dug through the whole object model and can't find a way to override things properly?

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

No branches or pull requests

2 participants