@php
function js_safe($str) {
$str = (string)$str;
$str = str_replace(["\r", "\n"], ' ', $str);
$str = str_replace("'", "\\'", $str);
$str = str_replace('"', '\\"', $str);
$str = preg_replace('/\s+/', ' ', $str);
return trim($str);
}
@endphp
@include('partials.button-brand', [
'class' => 'mt-6 md:mt-10 text-sm md:text-base',
'alpineContent' => 'slides[index].buttonLabel',
'attrs' => ['x-bind:href' => 'slides[index].buttonUrl'],
'icon' => 'arrow-top-right',
])