Skip to content

Commit a82552b

Browse files
authored
fix(themes): tokens preview app (#20564)
* chore(themes): fix v11 token preview by updating filter for activeGroup * chore: add contributor
1 parent 9a50928 commit a82552b

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

.all-contributorsrc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,17 @@
15171517
"contributions": [
15181518
"code"
15191519
]
1520+
},
1521+
{
1522+
"login": "didoo",
1523+
"name": "Cristiano Rastelli",
1524+
"avatar_url": "https://avatars.githubusercontent.com/u/686239?v=4",
1525+
"profile": "http://www.didoo.net/",
1526+
"contributions": [
1527+
"code",
1528+
"example"
1529+
]
15201530
}
15211531
],
15221532
"commitConvention": "none"
1523-
}
1533+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
369369
<td align="center"><a href="https://github.com/anjju"><img src="https://avatars.githubusercontent.com/u/20580246?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anju Shivan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=anjju" title="Code">💻</a></td>
370370
<td align="center"><a href="https://github.com/seanhaug"><img src="https://avatars.githubusercontent.com/u/227620549?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sean Haughey</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=seanhaug" title="Code">💻</a></td>
371371
<td align="center"><a href="https://github.com/Vignesh-Loganathan-IBM-1"><img src="https://avatars.githubusercontent.com/u/196759586?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vignesh-Loganathan-IBM-1</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Vignesh-Loganathan-IBM-1" title="Code">💻</a></td>
372+
<td align="center"><a href="http://www.didoo.net/"><img src="https://avatars.githubusercontent.com/u/686239?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cristiano Rastelli</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=didoo" title="Code">💻</a> <a href="#example-didoo" title="Examples">💡</a></td>
372373
</tr>
373374
</table>
374375

packages/themes/examples/preview/src/pages/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ export default function IndexPage() {
171171
<tbody>
172172
{tokens
173173
.filter((token) => {
174-
const group = token.groups.find((group) => {
175-
return group.name === activeGroup;
176-
});
177-
178-
if (!group) {
174+
if (
175+
activeGroup !== 'All' &&
176+
token.groups &&
177+
!token.groups.includes(activeGroup)
178+
) {
179179
return false;
180180
}
181181

0 commit comments

Comments
 (0)