Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow isn't visible #131

Closed
qarlosalberto opened this issue Feb 10, 2024 · 2 comments
Closed

Arrow isn't visible #131

qarlosalberto opened this issue Feb 10, 2024 · 2 comments

Comments

@qarlosalberto
Copy link

qarlosalberto commented Feb 10, 2024

I'm having problems to see the icons:

import "@vscode-elements/elements/dist/vscode-tree";

const tree = <any>document.getElementById("scope-tree");

const icons = {
    branch: 'folder',
    leaf: 'file',
    open: 'folder-opened',
  };
  const data = [
    {
      icons,
      label: 'node_modules',
      value: 'black hole',
      subItems: [
        {
          icons,
          label: '.bin',
          subItems: [
            { icons, label: '_mocha_' },
            { icons, label: '_mocha.cmd_' },
            { icons, label: '_mocha.ps1_' },
            { icons, label: 'acorn' },
            { icons, label: 'acorn.cmd' },
            { icons, label: 'acorn.ps1' },
          ],
        },
        {
          icons,
          label: '@11ty',
          open: true,
          subItems: [
            { icons, label: 'lorem.js' },
            { icons, label: 'ipsum.js' },
            { icons, label: 'dolor.js' },
          ],
        },
        { icons, label: '.DS_Store' },
      ],
    },
    {
      icons,
      label: 'scripts',
      subItems: [
        { icons, label: 'build.js' },
        { icons, label: 'start.js' },
      ],
    },
    { icons, label: '.editorconfig', selected: true },
    { icons, label: '2021-01-18T22_10_20_535Z-debug.log' },
  ];
  

tree.data = data;



tree.addEventListener('vsc-select', (event) => {
    console.log(event.detail);
});

In the HTML

            <vscode-tree id="scope-tree" arrows></vscode-tree>

imagen

@bendera
Copy link
Member

bendera commented Feb 10, 2024

The codicon css isn't included on the page.
https://vscode-elements.github.io/components/icon/#basic-example
My mistake, I'll update the docs.

@qarlosalberto
Copy link
Author

Thanks! it woks fine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants