deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

[Bug] Widget `style` prop does not apply styles for camel cased style keys

Open TylerMatteo opened this issue 1 year ago • 0 comments

Description

When I pass a style object to widgets, styles for camel cased attributes (borderColor, zIndex, etc) aren't applied. Setting styles with dash cased keys does work but that violates the CSSStyleDeclaration type.

Flavors

  • [ ] Script tag
  • [ ] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxOverlay
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [ ] ArcGIS

Expected Behavior

I expect to see all style applied to the widget while still complying with the typings

Steps to Reproduce

Here is a link to a branch of a repo that can be used to reproduce this issue: https://github.com/TylerMatteo/react-deck-boilerplate/tree/widget-dashcase-style-bug

To reproduce:

  1. Clone this repo and check out the widget-dashcase-style-bug branch
  2. npm install
  3. npm run dev
  4. Observe that the widget styles applied to ZoomWidget in /src/App.tsx aren't applied.

Environment

Logs

N/A

TylerMatteo avatar Jun 29 '24 17:06 TylerMatteo