Skip to content

Commit

Permalink
#1199: Add documentation for merge behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefBredereck committed May 8, 2020
1 parent ad3c415 commit ed0a819
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/docs/src/docs/pattern-pseudo-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Pseudo-patterns are similar to [pattern-specific JSON files](/docs/creating-patt

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.

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`.

```json
"patternMergeVariantArrays": false
```

From a navigation and naming perspective `patternName` and `pseudoPatternName` will be combined.

## Adding Pseudo-Patterns to Your Project
Expand Down

0 comments on commit ed0a819

Please sign in to comment.