jpudysz / react-native-unistyles

Level up your React Native StyleSheet

Home Page:https://unistyl.es

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Media query issue

HellYeahOmg opened this issue · comments

Description

From the example below from xs to xl everything works fine, same from xl to superLarge. Starting from superLarge breakpoint styles are not applied.

export function HomeScreen() {
  const { styles } = useStyles(stylesheet)
  return (
    <View>
      <Text style={styles.text}>lorem</Text>
    </View>
  )
}

const stylesheet = createStyleSheet({
  text: {
    color: {
      xs: 'red',
      xl: 'yellow',
    },
  },
})

Steps to reproduce

  1. install https://solito.dev/starter pack
  2. install unistyles into packages/app, add react-native-unistyles to next.config.js into transpilePackages
  3. copy & past unistyles config from the docs with breakpoints (the number 2000 is not that important, it could be 2300)
  4. update HomeScreen component from the example

Snack or a link to a repository (optional)

No response

Unistyles version

1.1.4

React Native version

Platforms

React Native Web

Nice catch @HellYeahOmg , fix will land in 1.1.5 - it's one liner 😅

Thank you for the extensive tests!

@HellYeahOmg 1.1.5 has been published, let me know if it fixes your issue!