tailwind-rn - Vue Native JavaScript

Since vue-native is based on react-native I was wondering if this will work? Does it need extra configuration?

Thank you

Asked Oct 07 '21 00:10
avatar mstroiu
mstroiu

1 Answer:

Solved!

You can use it like this:

<template>
  <view :style="tailwind('bg-red-300')">
    <text class="text-color-primary">{{ message }}</text>
  </view>
</template>

<script>
  import tailwind from 'tailwind-rn';

  export default {
    data() {
      return {
        message: "Hello World"
      };
    },
    created() {
      this.tailwind = tailwind
    }
  };
</script>
1
Answered Apr 14 '21 at 10:46
avatar  of mstroiu
mstroiu