Skip to content

performingdigital/cn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cn php

Simple tailwind merge wrapper for php that converts conditional classes into a single string.

It's using gehrisandro/tailwind-merge-php to merge tailwind classes.

use Performing\Cn\Cn;

$isDark = true;
Cn::merge('p-1 bg-red-500', ['text-white bg-blue-500' => $isDark]);
// p-1 text-white bg-blue-500

$isDark = false;
Cn::merge('p-1 bg-red-500', ['text-white bg-blue-500' => $isDark]);
// p-1 bg-red-500

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages