Skip to content

Commit

Permalink
Merge pull request #2731 from Leantime/steps-component
Browse files Browse the repository at this point in the history
Added steps component
  • Loading branch information
marcelfolaron authored Oct 10, 2024
2 parents 9a2216d + 7d5c4b1 commit 853b832
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/Views/Templates/components/navigations/steps/content.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@props([
'contentRole' => 'primary', //primary, secondary, accent
'data' => null
])

@php
$contentClass = $contentRole ? 'step-'.$contentRole : '';
$attributes = $attributes->class(['step '.$contentClass]);
if ($data !== null) {
$attributes = $attributes->merge(['data-content' => $data]);
}
@endphp

<li {{ $attributes }} >
{{ $slot }}
</li>
13 changes: 13 additions & 0 deletions app/Views/Templates/components/navigations/steps/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@props([
'variant' => 'horizontal', //horizontal, vertical
'classExtra' => '',
'contents',
])

@php
$variantClass = $variant === "vertical" ? 'steps-'.$variant : '';
@endphp

<ul {{ $attributes->merge(['class' => 'steps '.$variantClass.' '.$classExtra]) }}>
{{ $contents }}
</ul>

0 comments on commit 853b832

Please sign in to comment.