jpudysz / react-native-unistyles

Level up your React Native StyleSheet
https://unistyl.es
MIT License
1.55k stars 42 forks source link

feat: export UnistylesTheme #254

Closed yzhe554 closed 3 months ago

yzhe554 commented 4 months ago

Summary

Export UnistylesTheme

I am implementing customised styles for border with some business logics. I want to move the logic into a pure function. e.g

const getBorderColor = (theme: UnistylesThemes[keyof UnistylesThemes], focus: boolean, error: boolean) => {
    if (error) {
        return theme.colors.criticalDark;
    }
    ...
}

I can mock UnistylesTheme from local via UnistylesThemes[keyof UnistylesThemes] but it's better to use UnistylesTheme directly.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-unistyles-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2024 9:59am