Skip to content

Commit

Permalink
Merge pull request #307 from helsingborg-stad/feature/group-fluid-grid
Browse files Browse the repository at this point in the history
Feature: Fluid grid parameter
  • Loading branch information
NiclasNorin authored Jul 10, 2023
2 parents 838fc5a + e30baff commit 2f7fa72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions source/php/Component/Group/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public function init()
//Extract array for eazy access (fetch only)
extract($this->data);

if (!empty($fluidGrid)) {
$this->data['containerAware'] = true;
$this->data['classList'][] = $this->getBaseClass('fluid-grid', true);
}

if ($direction == "vertical") {
$this->data['classList'][] = $this->getBaseClass() . "--vertical";
} else {
Expand Down
7 changes: 5 additions & 2 deletions source/php/Component/Group/group.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"wrap": "",
"flexGrow": false,
"flexShrink": true,
"gap": ""
"gap": "",
"fluidGrid": false
},
"description": {
"direction": "What direction to group (horizontal or vertical)",
Expand All @@ -20,12 +21,14 @@
"wrap": "Wrap the content (ex. nowrap, wrap, wrap-reverse)",
"flexGrow": "Allow to grow the content within the group",
"flexShrink": "Allow to shrink the content within the group",
"gap": "A number between 1-10 that sets the gap between flexed elements."
"gap": "A number between 1-10 that sets the gap between flexed elements.",
"fluidGrid": "Uses flexbox and media queries to determine amount of items per row."
},
"view": "group.blade.php",
"dependency": {
"sass": {
"components": [
"group"
]
}
}
Expand Down

0 comments on commit 2f7fa72

Please sign in to comment.