Skip to content

[Bug] Theme type is wrong #179

@uladzimir-miadzinski

Description

@uladzimir-miadzinski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions