mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-27 06:33:18 +00:00
25 lines
568 B
PHP
25 lines
568 B
PHP
@blaze
|
|
|
|
@props([
|
|
'axis' => 'x',
|
|
'format' => null,
|
|
'field' => 'index',
|
|
'position' => null,
|
|
'tickValues' => null,
|
|
])
|
|
|
|
@php
|
|
$format = is_array($format) ? \Illuminate\Support\Js::encode($format) : $format;
|
|
|
|
$field ??= $axis === 'x' ? 'date' : $field;
|
|
@endphp
|
|
|
|
<template {{ $attributes->merge([
|
|
'name' => 'axis',
|
|
'axis' => $axis,
|
|
'format' => $format,
|
|
'position' => $position,
|
|
'tick-values' => is_string($tickValues) ? $tickValues : json_encode($tickValues),
|
|
]) }} @if ($field) field="{{ $field }}" @endif>
|
|
{{ $slot }}
|
|
</template> |