Skip to content

Commit

Permalink
Merge pull request #35 from joanrodas/joanrodas-patch-1
Browse files Browse the repository at this point in the history
Update Tab.php
  • Loading branch information
joanrodas committed Jul 11, 2023
2 parents e40823d + ba0cde4 commit 601bd2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CPF/Tabs/Tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function create(string $slug, string $name, $fields)
return (new self($slug, $name, $fields));
}

public function display_nav($parent='' {
public function display_nav($parent='') {
ob_start(); ?>
<a :class="{ 'active': tab === '<?= "tab_$this->slug" ?>' }" :style="tab === '<?= "tab_$this->slug" ?>' ? 'background: #2271b1; color: white; text-decoration: none; font-size: 1rem; text-transform: uppercase; padding: 0.5rem 1.5rem;' : 'text-decoration: none; font-size: 1rem; text-transform: uppercase; padding: 0.5rem 1.5rem;'" @click.prevent="tab = '<?= "tab_$this->slug" ?>'; window.location.hash = '<?= "tab_$this->slug" ?>'" href="#"><?= $this->name ?></a>
<?php echo ob_get_clean();
Expand Down

0 comments on commit 601bd2d

Please sign in to comment.