Skip to content

Commit

Permalink
add version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjagodic committed Mar 27, 2024
1 parent 398471a commit b1be7d6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/widgets/relation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The relation widget allows you to reference items from another collection. It pr
* `min`: minimum number of items; ignored if **multiple** is `false`
* `max`: maximum number of items; ignored if **multiple** is `false`
* `options_length`: accepts integer to override number of options presented to user. Defaults to `20`.
* `filters`: allows adding filters by which the available options are filtered. You can add filters which are a pair of `field` and the allowed `values`, where the widget will only show options (collection items) that satisfy all the filters. A collection item satisfies a filter if the value of `field` is one of the values in `values`.
* `filters`: <a href="https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.1.5" class="version-tag">3.1.5</a> allows adding filters by which the available options are filtered. You can add filters which are a pair of `field` and the allowed `values`, where the widget will only show options (collection items) that satisfy all the filters. A collection item satisfies a filter if the value of `field` is one of the values in `values`.
* **Referencing a folder collection example** (assuming a separate "authors" collection with "name" and "twitterHandle" fields with subfields "first" and "last" for the "name" field):

```yaml
Expand Down
14 changes: 14 additions & 0 deletions src/global-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,20 @@ const globalStyles = css`
text-align: right;
}
}
.version-tag {
&:before {
content: 'New in v';
}
background: ${theme.colors.primaryDark};
color: white;
padding: 0.125em 0.5em;
border-radius: ${theme.radii[1]};
font-size: ${theme.fontsize[1]};
font-weight: 700;
display: inline-block;
margin: 0 0.5em;
}
`;

function GlobalStyles() {
Expand Down

0 comments on commit b1be7d6

Please sign in to comment.