2.0.7 • Published 3 years ago

@robokozo/tailwind-class-organizer v2.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

tailwind-class-organizer

Installation

npm install @robokozo/tailwind-class-organizer

Setup

import { createApp } from "vue"
import App from "./App.vue"
import "./assets/tailwind.css"

import { vueDirective } from "@robokozo/tailwind-class-organizer"

const app = createApp(App)

app.directive("tw", vueDirective())

app.mount("#app")

Usage

<div
    class="w-10 h-10 bg-white"
    v-tw="{
        md: 'h-40 w-40 bg-red-500',
        lg: {
          default: 'h-20 w-20 bg-yellow-200',
          hover: 'bg-yellow-900'
        }
    }">
</div>

Note: v-tw is configured when adding the directive to the app instance in setup app.directive("tw", vueDirective)


Produces

<div class="w-10 h-10 bg-white md:h-40 md:w-40 md:bg-red-500 lg:h-20 lg:w-20 lg:bg-yellow-200 lg:hover:bg-yellow-900"></div>
2.0.7

3 years ago

1.0.5

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.6

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago