Skip to content

Commit a5dc6c4

Browse files
authored
Merge pull request #11 from mohit23x/responsive-values
Responsive values
2 parents 6d9a3f5 + 767e8dc commit a5dc6c4

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
# React Native Sugar Style
1+
<h1 align="left">
22

3-
Theme based alternative for React Native StyleSheet. (🧪 Experimental)
3+
React Native Sugar Style
4+
5+
</h1>
6+
https://www.npmjs.com/package/react-native-sugar-style (🧪 Experimental)
7+
8+
- Theme based alternative for React Native StyleSheet
9+
10+
- Support responsive values as array
11+
12+
- works on android/ios/web (expo/react-native)
413

514
| BEFORE | AFTER |
615
| ------------------------------------- | ---------------------------------- |
@@ -123,7 +132,7 @@ const Component = () => {
123132
### Demo
124133

125134
Scan and run with expo go app, run the [example project](https://github.com/mohit23x/react-native-sugar-style/tree/main/example) for a more detailed example.
126-
https://expo.io/@mohit23x/projects/react-native-sugar-style
135+
https://expo.io/@mohit23x/projects/react-native-sugar-style or try the [react native web version](https://sugar-style.netlify.app/)
127136

128137
![Scan QR with expo app](assets/qr.png 'Scan QR')
129138

@@ -157,4 +166,3 @@ Special thanks to the Authors of the amazing open source libraries
157166
### Caveats
158167

159168
- May introduce performance issues (not tested)
160-
- Dimension values are not dynamic (device height/width don't change based on orientation)

example/components/Counter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function Counter() {
2121
);
2222
}
2323

24-
const styles = StyleSheet.create((theme, constants) => ({
24+
const styles = StyleSheet.create(theme => ({
2525
pressable: {
2626
alignItems: "center",
2727
justifyContent: "center",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-sugar-style",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "React Native Stylesheet alternative with theme support",
55
"author": "mohit23x",
66
"license": "MIT",

0 commit comments

Comments
 (0)