Skip to content

Commit

Permalink
DataTable - add Explorer struct (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
i-go-meow authored Jan 21, 2024
1 parent 31c064f commit dd2bbf7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
12 changes: 12 additions & 0 deletions assets/data_table/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ const customHeaderIcons = {
<path fill="${p.fgColor}" d="M0 0h24v24H0z"/>
<path fill="${p.bgColor}" d="M12 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2zm1 10V8h-2v4H8l4 4 4-4h-3z"/>
</svg>`,
curlyBraces: (
p
) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12" fill="white">
<rect width="100%" height="100%" fill="${p.bgColor}" /> <path d="M4 18V14.3C4 13.4716 3.32843 12.8 2.5
12.8H2V11.2H2.5C3.32843 11.2 4 10.5284 4 9.7V6C4 4.34315 5.34315 3 7 3H8V5H7C6.44772 5 6 5.44772 6
6V10.1C6 10.9858 5.42408 11.7372 4.62623 12C5.42408 12.2628 6 13.0142 6 13.9V18C6 18.5523 6.44772 19 7
19H8V21H7C5.34315 21 4 19.6569 4 18ZM20 14.3V18C20 19.6569 18.6569 21 17 21H16V19H17C17.5523 19 18 18.5523 18
18V13.9C18 13.0142 18.5759 12.2628 19.3738 12C18.5759 11.7372 18 10.9858 18 10.1V6C18 5.44772 17.5523 5 17
5H16V3H17C18.6569 3 20 4.34315 20 6V9.7C20 10.5284 20.6716 11.2 21.5 11.2H22V12.8H21.5C20.6716 12.8 20 13.4716 20
14.3Z"></path></svg>`,
};

const headerIcons = {
Expand All @@ -42,6 +52,7 @@ const headerIcons = {
uri: GridColumnIcon.HeaderUri,
date: GridColumnIcon.HeaderDate,
list: GridColumnIcon.HeaderArray,
struct: "curlyBraces",
};

const cellKind = {
Expand All @@ -50,6 +61,7 @@ const cellKind = {
uri: GridCellKind.Uri,
date: GridCellKind.Text,
list: GridCellKind.Text,
struct: GridCellKind.Text,
};

const theme = {
Expand Down
Loading

0 comments on commit dd2bbf7

Please sign in to comment.