Skip to content

Commit

Permalink
apply proposed "link" class solution
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Mar 20, 2024
1 parent 896f6df commit b4708ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 11 additions & 11 deletions demos/interactive/popup.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,25 +115,25 @@ protected function init(): void
$c1 = $cols->addColumn();
Header::addTo($c1, ['size' => 'small'])->set('Snacks');
$l1 = View::addTo($c1, ['ui' => 'list']);
MenuItem::addTo($l1, ['content' => 'Crisps', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l1, ['content' => 'Pork Scratchings', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l1, ['content' => 'Candies', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l1, ['content' => 'Sweets', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l1, ['content' => 'Crisps', 'ui' => 'item']);
MenuItem::addTo($l1, ['content' => 'Pork Scratchings', 'ui' => 'item']);
MenuItem::addTo($l1, ['content' => 'Candies', 'ui' => 'item']);
MenuItem::addTo($l1, ['content' => 'Sweets', 'ui' => 'item']);

$c2 = $cols->addColumn();
Header::addTo($c2, ['size' => 'small'])->set('Drinks');
$l2 = View::addTo($c2, ['ui' => 'list']);
MenuItem::addTo($l2, ['content' => 'Fizzy Drink', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l2, ['content' => 'Hot Latte', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l2, ['content' => 'Water', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l2, ['content' => 'Apple Juice', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l2, ['content' => 'Fizzy Drink', 'ui' => 'item']);
MenuItem::addTo($l2, ['content' => 'Hot Latte', 'ui' => 'item']);
MenuItem::addTo($l2, ['content' => 'Water', 'ui' => 'item']);
MenuItem::addTo($l2, ['content' => 'Apple Juice', 'ui' => 'item']);

$c3 = $cols->addColumn();
Header::addTo($c3, ['size' => 'small'])->set('Mains');
$l3 = View::addTo($c3, ['ui' => 'list']);
MenuItem::addTo($l3, ['content' => 'Chicken Tikka', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l3, ['content' => 'Green Curry', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l3, ['content' => 'Pastries', 'ui' => 'item'])->setElement('a');
MenuItem::addTo($l3, ['content' => 'Chicken Tikka', 'ui' => 'item']);
MenuItem::addTo($l3, ['content' => 'Green Curry', 'ui' => 'item']);
MenuItem::addTo($l3, ['content' => 'Pastries', 'ui' => 'item']);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/MenuItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class MenuItem extends View
#[\Override]
protected function renderView(): void
{
$this->addClass('link'); // set "link" mouse cursor

if ($this->label) {
Label::addTo($this, [$this->label]);
}
Expand Down

0 comments on commit b4708ad

Please sign in to comment.