diff --git a/src/Helpers/TailwindTrait.php b/src/Helpers/TailwindTrait.php index 71dac567..b69f4175 100644 --- a/src/Helpers/TailwindTrait.php +++ b/src/Helpers/TailwindTrait.php @@ -98,6 +98,10 @@ public static function getTwDynamicPart($part, $attributes, $manifest, ...$custo $value = Helpers::checkAttr($attributeName, $attributes, $manifest, true); + if (\is_bool($value)) { + $value = $value ? 'true' : 'false'; + } + if ($responsive ? empty($value['_default'] ?? '') : !$value) { continue; } @@ -175,6 +179,10 @@ public static function getTwClasses($attributes, $manifest, ...$custom) $value = Helpers::checkAttr($attributeName, $attributes, $manifest, true); + if (\is_bool($value)) { + $value = $value ? 'true' : 'false'; + } + if ($responsive ? empty($value['_default'] ?? '') : !$value) { continue; } @@ -227,6 +235,10 @@ public static function getTwClasses($attributes, $manifest, ...$custom) foreach ($conditions as $key => $attrConditions) { $value = Helpers::checkAttr($key, $attributes, $manifest, true); + if (\is_bool($value)) { + $value = $value ? 'true' : 'false'; + } + $isArrayCondition = \is_array($attrConditions); if (!$value) {