Skip to content

Commit ed0a819

Browse files
#1199: Add documentation for merge behavior
1 parent ad3c415 commit ed0a819

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/docs/src/docs/pattern-pseudo-patterns.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Pseudo-patterns are similar to [pattern-specific JSON files](/docs/creating-patt
1919

2020
The tilde (`~`) and `.json` file extension are the hints that Pattern Lab uses to determine that this is a pseudo-pattern. The `patternName` tells Pattern Lab which existing pattern it should use when rendering the pseudo-pattern. The JSON file itself works exactly like the [pattern-specific JSON file](/docs/creating-pattern-specific-values/). It has the added benefit that the pseudo-pattern will also inherit any values from the existing pattern's pattern-specific JSON file.
2121

22+
As default arrays in pseudo-pattern data will be concatenated with the base patterns array data. To override this behavior globally you can set the parameter `patternMergeVariantArrays` in you `patternlab-config.json` to `false`.
23+
24+
```json
25+
"patternMergeVariantArrays": false
26+
```
27+
2228
From a navigation and naming perspective `patternName` and `pseudoPatternName` will be combined.
2329

2430
## Adding Pseudo-Patterns to Your Project

0 commit comments

Comments
 (0)