@kbach/native 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -16
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Tailwind-like utility classes for **React Native and Expo**. One package includes everything: the core engine, JSX runtime, Babel plugin for compile-time optimization, and Metro config helper.
4
4
 
5
- ```tsx
5
+ ```
6
6
  import { View, Text, TouchableOpacity } from 'react-native';
7
7
  import { styled } from '@kbach/native';
8
8
 
@@ -65,7 +65,7 @@ module.exports = withKbach(config);
65
65
 
66
66
  ### 3. Wrap your app
67
67
 
68
- ```tsx
68
+ ```
69
69
  import { ThemeProvider } from '@kbach/native';
70
70
 
71
71
  export default function App() {
@@ -89,7 +89,7 @@ npx expo start --clear
89
89
 
90
90
  Works on any React Native component — View, Text, TouchableOpacity, TextInput, and third-party components.
91
91
 
92
- ```tsx
92
+ ```
93
93
  <View className="flex-1 bg-gray-2 dark:bg-gray-11 p-4" />
94
94
  <Text className="text-lg font-bold text-gray-10 dark:text-white" />
95
95
  <TouchableOpacity className="bg-blue-7 pressed:bg-blue-8 rounded-xl px-6 py-3" />
@@ -99,7 +99,7 @@ Works on any React Native component — View, Text, TouchableOpacity, TextInput,
99
99
 
100
100
  Pre-style any component. Handles interaction states (pressed, focus, etc.) automatically.
101
101
 
102
- ```tsx
102
+ ```
103
103
  import { styled } from '@kbach/native';
104
104
  import { View, Text, TouchableOpacity, TextInput } from 'react-native';
105
105
 
@@ -117,7 +117,7 @@ const Input = styled(
117
117
 
118
118
  Pass extra classes at use time with the `tw` prop:
119
119
 
120
- ```tsx
120
+ ```
121
121
  <Card tw="mt-4 mb-2">
122
122
  <Title tw="text-3xl">Hello</Title>
123
123
  </Card>
@@ -127,7 +127,7 @@ Pass extra classes at use time with the `tw` prop:
127
127
 
128
128
  Resolve classes to a style object inside a component. Use this when you need a value for the `style` prop.
129
129
 
130
- ```tsx
130
+ ```
131
131
  import { useStyles } from '@kbach/native';
132
132
  import { View, Text } from 'react-native';
133
133
 
@@ -145,9 +145,9 @@ function Badge() {
145
145
 
146
146
  ### tw(classes)
147
147
 
148
- Resolve classes outside a component, for use in `StyleSheet.create()` or static contexts.
148
+ Resolve classes outside a component, for use in StyleSheet.create() or static contexts.
149
149
 
150
- ```tsx
150
+ ```
151
151
  import { StyleSheet } from 'react-native';
152
152
  import { tw } from '@kbach/native';
153
153
 
@@ -161,7 +161,7 @@ const styles = StyleSheet.create({
161
161
 
162
162
  Conditionally join class strings. Falsy values are ignored.
163
163
 
164
- ```tsx
164
+ ```
165
165
  import { cx } from '@kbach/native';
166
166
 
167
167
  <View className={cx(
@@ -173,7 +173,7 @@ import { cx } from '@kbach/native';
173
173
 
174
174
  ### useTheme()
175
175
 
176
- ```tsx
176
+ ```
177
177
  import { useTheme } from '@kbach/native';
178
178
 
179
179
  const { mode, resolvedMode, isDark, setMode, toggle } = useTheme();
@@ -191,7 +191,7 @@ const { mode, resolvedMode, isDark, setMode, toggle } = useTheme();
191
191
 
192
192
  Drop-in toggle component that works on both web and native.
193
193
 
194
- ```tsx
194
+ ```
195
195
  <ThemeToggle /> // button (default)
196
196
  <ThemeToggle variant="switch" /> // toggle switch
197
197
  <ThemeToggle variant="icon-button" /> // icon button
@@ -211,14 +211,14 @@ Up to 3 modifiers can be chained in any order.
211
211
  | active: | Element active |
212
212
  | disabled: | Element disabled |
213
213
 
214
- ```tsx
214
+ ```
215
215
  <View className="dark:bg-gray-10" />
216
216
  <TouchableOpacity className="dark:pressed:bg-indigo-8" />
217
217
  ```
218
218
 
219
219
  ## Arbitrary values
220
220
 
221
- ```tsx
221
+ ```
222
222
  <View className="bg-[#6366f1]" />
223
223
  <View className="p-[14px]" />
224
224
  <Text className="text-[18px]" />
@@ -228,14 +228,14 @@ Up to 3 modifiers can be chained in any order.
228
228
 
229
229
  ## Negative values
230
230
 
231
- ```tsx
231
+ ```
232
232
  <View className="-mt-4" /> // marginTop: -16
233
233
  <View className="-mx-2" /> // marginHorizontal: -8
234
234
  ```
235
235
 
236
236
  ## Color with opacity
237
237
 
238
- ```tsx
238
+ ```
239
239
  <View className="bg-blue-6/50" /> // 50% opacity
240
240
  <View className="bg-gray-10/75" /> // 75% opacity
241
241
  ```
@@ -298,7 +298,7 @@ module.exports = {
298
298
 
299
299
  Apply at runtime:
300
300
 
301
- ```tsx
301
+ ```
302
302
  import { updateConfig } from '@kbach/native';
303
303
 
304
304
  updateConfig({ extend: { theme: { colors: { brand: { 6: '#6366f1' } } } } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/native",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Single-package Kbach install for React Native and Expo — includes core, components, Babel plugin, and Metro config",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@kbach/core": "0.1.0",
37
- "@kbach/react": "0.1.2",
37
+ "@kbach/react": "0.1.3",
38
38
  "babel-plugin-kbach": "0.1.0"
39
39
  },
40
40
  "devDependencies": {