10
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2026-04-21 21:19:51 +00:00

Add node modules and new code for release

This commit is contained in:
taakleton 2022-01-26 21:54:24 +00:00 committed by GitHub
parent da63a48ad7
commit 3925f466de
8435 changed files with 1764387 additions and 7 deletions

View file

@ -0,0 +1,31 @@
const React = require('react');
module.exports = function FileBreadcrumbs({ fileFilter = '', setFileFilter }) {
const parts = fileFilter.split('/');
const breadcrumbs = [
{
path: '',
name: 'all files'
},
...parts.map((part, i) => ({
path: parts.slice(0, i + 1).join('/'),
name: part
}))
];
return breadcrumbs.map(({ path, name }) =>
path === fileFilter ? (
name
) : (
<>
<a
href="javascript:void(0)"
onClick={() => setFileFilter(path)}
>
{name}
</a>
/
</>
)
);
};