Skip to content

Releases: jpudysz/react-native-unistyles

Release 2.3.0-beta.0

05 Feb 18:35
Compare
Choose a tag to compare
Release 2.3.0-beta.0 Pre-release
Pre-release

2.3.0-beta.0 (2024-02-05)

Features

  • add boilerplate for windows (b418a08)
  • add event handlers for windows (3a5a7a9)
  • add windows bridge (2e9a04b)

Release 2.2.0

26 Jan 13:25
Compare
Choose a tag to compare

2.2.0 (2024-01-26)

Features

  • update theme at runtime (35197ca)

You can now update the theme at runtime. This is useful if you want to show the user interface with default colors and later alter theme based on user preferences.

UnistylesRuntime.updateTheme('light', theme => ({
     ...theme,
     // override theme here 😈
     // if currently selected theme has been updated, unistyles will re-render
}))

Docs: https://reactnativeunistyles.vercel.app/reference/theming/#update-theme-during-runtime

Release 2.1.1

23 Jan 17:22
Compare
Choose a tag to compare

2.1.1 (2024-01-23)

Bug Fixes

  • initial screen height for ios (f64e2a8)

Release 2.1.0

23 Jan 08:35
Compare
Choose a tag to compare

2.1.0 (2024-01-23)

Features

Example

You can now use boolean values to select the variants:

import { useStyles } from 'react-native-unistyles'

const Component = ({ isPrimary, isDisabled }) => {
    const { styles } = useStyles(stylesheet, {
        color: !isDisabled,
        borderColor: isPrimary
        // you can also use strings
        // color: "true" | "false"
    })

    return (
        <View style={styles.container} />
    )
}

const stylesheet = createStyleSheet(theme => ({
    container: {
        // otter styles
        variants: {
            color: {
                true: {
                    backgroundColor: theme.colors.primary
                },
                false: {
                    backgroundColor: theme.colors.disabled
                },
                // you can still specify a default variant
                default: {
                    backgroundColor: theme.colors.barbie
                }
                // or other variants
                special: {
                    backgroundColor: theme.colors.special
                }
            },
            borderColor: {
                true: {
                    borderColor: theme.colors.primary
                }
                // you can also skip "false" here
            }
        }
    }
})

If you specify a boolean variants like β€œtrue”, there is no requirement to specify a β€œfalse” variant (and vice versa). You can mix boolean variants with other variants as well.

Release 2.0.2

17 Jan 23:26
Compare
Choose a tag to compare

2.0.2 (2024-01-17)

Features

  • export UnistylesValues type (b76078b)
  • mention in migration guide pod install (a68b5b8)

Release 2.0.1

12 Jan 01:16
Compare
Choose a tag to compare

2.0.1 (2024-01-12)

Bug Fixes

  • dependency array for no theme (d3c5031)

Release 2.0.0

02 Jan 11:12
Compare
Choose a tag to compare

2.0.0 (2024-01-02)

Features

Release 2.0.0-rc.4

28 Dec 17:04
Compare
Choose a tag to compare
Release 2.0.0-rc.4 Pre-release
Pre-release

2.0.0-rc.4 (2023-12-28)

Bug Fixes

Features

Release 2.0.0-rc.2

17 Dec 12:46
Compare
Choose a tag to compare
Release 2.0.0-rc.2 Pre-release
Pre-release

2.0.0-rc.2 (2023-12-17)

Bug Fixes

Features

Release 2.0.0-rc.1

13 Dec 10:52
Compare
Choose a tag to compare
Release 2.0.0-rc.1 Pre-release
Pre-release

2.0.0-rc.1 (2023-12-13)

Features

  • add expressive code plugin (b39f810)
  • add guide for sponsors and showcases (1113bad)
  • add jsdoc metadata (ea83471)
  • add new documentation pages (26b1a7b)
  • change readme add new charts (3bb7c63)
  • finish the docs (16f4d3b)
  • first batch of docs (e71ad74)
  • next batch of docs (029a801)
  • polish the docs (5a58a77)
  • replace all todos and change docs color (cd59ade)
  • update opengraph image (94108d4)