Open
Description
Description
new breakpoints in the config file not able to resolve when styling components
CodeSandbox/Snack link
https://codesandbox.io/p/sandbox/fragrant-platform-z3mm9j?file=%2Fsrc%2FApp.tsx%3A18%2C13
Steps to reproduce
- Extract gluestack theme (gluestack-style.config.ts)
- use createConfig and extend from @gluestack-ui/config config with your own custom config
- add custom mediaQueries in tokens
- use the custom mediaQuery on any component using the gluestack provider with the exctracted theme
gluestack-ui Version
latest
Platform
- Expo
- React Native CLI
- Next
- Web
- Android
- iOS
Other Platform
No response
Additional Information
gluestack-style.config.ts
import {config} from '@gluestack-ui/config';
import {createConfig} from '@gluestack-ui/themed';
export const customConfig = createConfig({
...config,
tokens: {
mediaQueries: {
base: '@media screen and (min-width: 0)',
customBreakpoint: '@media screen and (min-width: 300)',
sm: '@media screen and (min-width: 600px)',
md: '@media screen and (min-width: 905px)',
lg: '@media screen and (min-width: 1240px)',
xl: '@media screen and (min-width: 1440px)',
}
},
} as const);
type Config = typeof customConfig;
declare module '@gluestack-style/react' {
interface ICustomConfig extends Config {}
}
Metadata
Metadata
Assignees
Type
Projects
Status
Backlog