jxom / bumbag-ui

Build themeable React & React Native applications with your Bumbag 👝
https://bumbag.style
MIT License
1.01k stars 50 forks source link

Typing issues when using breakpoint properties in global styles #235

Open Johoseph opened 2 years ago

Johoseph commented 2 years ago

When passing breakpoint object properties into the bumbag global theme provider, typescript complains as below:

image

Example code setup to reproduce:

const theme = {
  Toast: {
    styles: {
      base: {
        maxWidth: {
          default: "400px",
          "max-mobile": "300px",
        },
      },
    },
  },
};

const App = () => {
  return (
    <BumbagProvider theme={theme}>
        <Component />
        <ToastManager />
    </BumbagProvider>
  );
};

Expected behavior

No typescript compilation error.

Using non-native version 2.7.21