You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
The ability to extend _data.json with pattern-specific data.
The listItems helper.
It would be so darn cool if you could extend _listitems.json similarly.
Example: I want a specific pattern to have a list of items with a human time difference. Ideally, it'd be neat if I could somehow specify a pattern specific _listitems.json file like this:
While _listems.json isn't sacred that feature should be extendable in the same way as _data.json. Again, editing that part of PL so it's good timing :)
This feature has landed in dev. I'd like to test it some more but it seems to work. Real docs will make their way to the pattern lab site once we get ready to push the new release. For now a simple example. To override the listItems to be used on pages-article do the following:
Create 04-pages/02-article.listitems.json
In 02-article.listitems.json add your elements with the same numbering as _data/_listitems.json.
If the items share the same keys data will be replaced. Otherwise it will be appended. Play with it and you'll quickly see how it works.
Two features I love in Pattern Lab:
_data.json
with pattern-specific data.listItems
helper.It would be so darn cool if you could extend
_listitems.json
similarly.Example: I want a specific pattern to have a list of items with a human time difference. Ideally, it'd be neat if I could somehow specify a pattern specific
_listitems.json
file like this:(There's also a chance I'm just treating
_listitems.json
as sacred when it really isn't.)The text was updated successfully, but these errors were encountered: