Skip to content

Commit

Permalink
chore: Switching more components over to using the styleguide accordion
Browse files Browse the repository at this point in the history
  • Loading branch information
breakdancingcat committed May 1, 2024
1 parent adcad23 commit 7f85a65
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion resources/views/components/accordion-styleguide.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="content">
{!! $item['description'] !!}

<table style="cell-padding: 5px;" class="mt-4 {{ $loop->first ? 'no-stripe' : '' }}">
<table style="cell-padding: 5px;" class="mt-4 {{ ($item['promo_item_id'] === 'componentConfiguration') ? 'no-stripe' : '' }}">
@if($item['promo_item_id'] === 'componentConfiguration')
<thead>
<tr>
Expand Down
22 changes: 13 additions & 9 deletions styleguide/Http/Controllers/ComponentAccordionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,25 @@ public function index(Request $request): View
'promo_item_id' => 'componentConfiguration',
'title' => 'Component configuration',
'description' => '',
'Page field' => '<code>modular-accordion</code>',
'Data' => '<pre>{
"id":0000,
'tr1' => [
'Page field' => 'modular-accordion-1',
'Data' => '{
"id":000000,
"heading":"My accordion"
}</pre>',
}',
],
],
1 => [
'promo_item_id' => 'promoGroupDetails',
'title' => 'Promo group details',
'description' => '',
'Title' => 'Text on closed accordion',
'Description' => 'Content when the accordion is clicked open',
'Filename' => 'Optional image, variable size',
'Excerpt' => 'Image caption',
'Option' => 'Image orientation: Right, Left, Center',
'table' => [
'Title' => 'Text on closed accordion',
'Description' => 'Content when the accordion is clicked open',
'Filename' => 'Optional image, variable size',
'Excerpt' => 'Image caption',
'Option' => 'Image orientation: Right, Left, Center',
],
],
],
'component' => [
Expand Down

0 comments on commit 7f85a65

Please sign in to comment.