Skip to content

Commit 52b9fb5

Browse files
kimchouarddannyhw
andauthored
Adding TailWind configuration example (#85)
* Adding tailwind configuration example * fix: remove unneeded plugin --------- Co-authored-by: Daniel Williams <[email protected]>
1 parent 82d49e4 commit 52b9fb5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,40 @@ module.exports = {
233233
</td>
234234
</tr>
235235

236+
<tr>
237+
<td>nativewind</td>
238+
<td>
239+
<details>
240+
<summary>
241+
Click to here to see the config
242+
</summary>
243+
Nativewind requires some additional babel config to work correctly. You can see an example of this config below.
244+
245+
```js
246+
module.exports = {
247+
addons: [
248+
/*existing addons,*/
249+
{
250+
name: '@storybook/addon-react-native-web',
251+
options: {
252+
modulesToTranspile: [
253+
'react-native-reanimated',
254+
'nativewind',
255+
'react-native-css-interop',
256+
],
257+
babelPresets: ['nativewind/babel'],
258+
babelPresetReactOptions: { jsxImportSource: 'nativewind' },
259+
babelPlugins: ['react-native-reanimated/plugin'],
260+
},
261+
},
262+
],
263+
};
264+
```
265+
266+
</details>
267+
</td>
268+
</tr>
269+
236270
</table>
237271

238272
## Adding support for static assets and svgs

0 commit comments

Comments
 (0)