Skip to content

Commit

Permalink
Feat: Drawer close button color (#319)
Browse files Browse the repository at this point in the history
* Feat: Drawer close button color

* Refactor: Removing old code

* Fix: Potential errors and multple handling

---------

Co-authored-by: Niclas Norin <niclas.norin@helsingborg.se>
Co-authored-by: Sebastian Thulin <sebastianthulin@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 2, 2023
1 parent fef9fb6 commit 9ab1de7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions source/php/Component/Drawer/drawer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
'data-simulate-click' => $simulateClickSelector
],
'classList' => [
'c-drawer__close'
'c-drawer__close',
],
'size' => 'md',
'text' => $label,
'context' => 'drawer.closeButton'
])
@endbutton

Expand Down
9 changes: 6 additions & 3 deletions source/php/Component/Select/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ public function init()
//Extract array for eazy access (fetch only)
extract($this->data);

//Create an random id if not assigned to the component.
$this->data['id'] = $id = $id ? $id : uniqid();
// Must include a id.
if (empty($id)) {
$id = $this->data['id'] = uniqid();
}
$this->data['attributeList']['id'] = "select_{$id}";

//Set icon size
$this->data['iconSize'] = $this->getIconSize($size);
Expand Down Expand Up @@ -59,7 +62,7 @@ public function init()
}

$this->data['intersection'] = [];
if (is_array($preselected) && !empty($options)) {
if (!empty($options) && is_array($preselected)) {
// Create an associative array from $preselected with keys same as values
$preselectedKeys = array_flip($preselected);

Expand Down

0 comments on commit 9ab1de7

Please sign in to comment.