30 lines
1.2 KiB
PHP
30 lines
1.2 KiB
PHP
@props(['title' => 'title component', 'visible_data' => false, 'data' => 'data text', 'visible_data_type' => false,
|
|
'data_type' => '','style' => '', 'size' => '', 'line' => []])
|
|
|
|
@section('css')
|
|
@vite(['resources/scss/components/_custom_circle.scss'])
|
|
@endsection
|
|
|
|
<div class="custom-circle-wrapper {{ $size }}" style="{{ $style }}">
|
|
<div class="custom-circle-content">
|
|
<p class="custom-circle-text">{{ $title }}</p>
|
|
@if ($visible_data === "true")
|
|
<div class="custom-circle-data">{{ $data }}</div>
|
|
@endif
|
|
@if ($visible_data_type === "true")
|
|
<div class="custom-circle-data-type">{{ $data_type }}</div>
|
|
@endif
|
|
@if (!empty($lines))
|
|
<svg class="absolute w-full h-full" viewBox="0 0 100 100" preserveAspectRatio="none">
|
|
@foreach ($lines as $line)
|
|
<line
|
|
x1="{{ $line['x1'] }}" y1="{{ $line['y1'] }}"
|
|
x2="{{ $line['x2'] }}" y2="{{ $line['y2'] }}"
|
|
stroke="{{ $line['color'] ?? 'black' }}"
|
|
stroke-width="{{ $line['width'] ?? 2 }}"
|
|
/>
|
|
@endforeach
|
|
</svg>
|
|
@endif
|
|
</div>
|
|
</div> |