Skip to content

Commit

Permalink
docs(icons): External Lucide icons like from lab on lucide.dev (#2194)
Browse files Browse the repository at this point in the history
* Add section title

* Add external libs list in sidebar

* Make external lib work

* Adds external lib to detail view

* fix lint issues

* Update to https
  • Loading branch information
ericfennis committed Jun 25, 2024
1 parent f980863 commit e11fa13
Show file tree
Hide file tree
Showing 31 changed files with 835 additions and 64 deletions.
4 changes: 4 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export default defineConfig({
new URL('./theme/components/overrides/VPFooter.vue', import.meta.url),
),
},
{
find: '~/.vitepress',
replacement: fileURLToPath(new URL('./', import.meta.url)),
},
],
},
},
Expand Down
186 changes: 186 additions & 0 deletions docs/.vitepress/data/categoriesData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
[
{
"name": "accessibility",
"title": "Accessibility"
},
{
"name": "account",
"title": "Accounts & access"
},
{
"name": "animals",
"title": "Animals"
},
{
"name": "arrows",
"title": "Arrows"
},
{
"name": "brands",
"title": "Brands"
},
{
"name": "buildings",
"title": "Buildings"
},
{
"name": "charts",
"title": "Charts"
},
{
"name": "communication",
"title": "Communication"
},
{
"name": "connectivity",
"title": "Connectivity"
},
{
"name": "currency",
"title": "Currency"
},
{
"name": "cursors",
"title": "Cursors"
},
{
"name": "design",
"title": "Design"
},
{
"name": "development",
"title": "Coding & development"
},
{
"name": "devices",
"title": "Devices"
},
{
"name": "emoji",
"title": "Emoji"
},
{
"name": "files",
"title": "File icons"
},
{
"name": "food-beverage",
"title": "Food & beverage"
},
{
"name": "furniture",
"title": "Furniture"
},
{
"name": "gaming",
"title": "Gaming"
},
{
"name": "home",
"title": "Home"
},
{
"name": "layout",
"title": "Layout"
},
{
"name": "mail",
"title": "Mail"
},
{
"name": "maps",
"title": "Maps"
},
{
"name": "maths",
"title": "Maths"
},
{
"name": "medical",
"title": "Medical"
},
{
"name": "money",
"title": "Money"
},
{
"name": "multimedia",
"title": "Multimedia"
},
{
"name": "nature",
"title": "Nature"
},
{
"name": "navigation",
"title": "Navigation"
},
{
"name": "notifications",
"title": "Notifications"
},
{
"name": "people",
"title": "People"
},
{
"name": "photography",
"title": "Photography"
},
{
"name": "science",
"title": "Science"
},
{
"name": "seasons",
"title": "Seasons"
},
{
"name": "security",
"title": "Security"
},
{
"name": "shapes",
"title": "Shapes"
},
{
"name": "shopping",
"title": "Shopping"
},
{
"name": "social",
"title": "Social"
},
{
"name": "sports",
"title": "Sports"
},
{
"name": "sustainability",
"title": "Sustainability"
},
{
"name": "text",
"title": "Text formatting"
},
{
"name": "time",
"title": "Time & calendar"
},
{
"name": "tools",
"title": "Tools"
},
{
"name": "transportation",
"title": "Transportation"
},
{
"name": "travel",
"title": "Travel"
},
{
"name": "weather",
"title": "Weather"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ type CodeExampleType = {
const getIconCodes = (): CodeExampleType => {
return [
{
language: 'html',
title: 'HTML',
code: `<i data-lucide="Name"></i>`,
language: 'js',
title: 'Vanilla',
code: `\
import { createIcons, icons } from 'lucide';
createIcons({ icons });
document.body.append('<i data-lucide="$Name"></i>');\
`,
},
{
language: 'tsx',
title: 'React',
code: `import { PascalCase } from 'lucide-react';
code: `import { $PascalCase } from 'lucide-react';
const App = () => {
return (
<PascalCase />
<$PascalCase />
);
};
Expand All @@ -32,32 +38,32 @@ export default App;
language: 'vue',
title: 'Vue',
code: `<script setup>
import { PascalCase } from 'lucide-vue-next';
import { $PascalCase } from 'lucide-vue-next';
</script>
<template>
<PascalCase />
<$PascalCase />
</template>
`,
},
{
language: 'svelte',
title: 'Svelte',
code: `<script>
import { PascalCase } from 'lucide-svelte';
import { $PascalCase } from 'lucide-svelte';
</script>
<PascalCase />
<$PascalCase />
`,
},
{
language: 'tsx',
title: 'Preact',
code: `import { PascalCase } from 'lucide-preact';
code: `import { $PascalCase } from 'lucide-preact';
const App = () => {
return (
<PascalCase />
<$PascalCase />
);
};
Expand All @@ -67,11 +73,11 @@ export default App;
{
language: 'tsx',
title: 'Solid',
code: `import { PascalCase } from 'lucide-solid';
code: `import { $PascalCase } from 'lucide-solid';
const App = () => {
return (
<PascalCase />
<$PascalCase />
);
};
Expand All @@ -82,16 +88,16 @@ export default App;
language: 'tsx',
title: 'Angular',
code: `// app.module.ts
import { LucideAngularModule, PascalCase } from 'lucide-angular';
import { LucideAngularModule, $PascalCase } from 'lucide-angular';
@NgModule({
imports: [
LucideAngularModule.pick({ PascalCase })
LucideAngularModule.pick({ $PascalCase })
],
})
// app.component.html
<lucide-icon name="Name"></lucide-icon>
<lucide-icon name="$Name"></lucide-icon>
`,
},
{
Expand All @@ -101,7 +107,7 @@ import { LucideAngularModule, PascalCase } from 'lucide-angular';
@import ('~lucide-static/font/Lucide.css');
</style>
<div class="icon-Name"></div>
<div class="icon-$Name"></div>
`,
},
];
Expand Down
Loading

0 comments on commit e11fa13

Please sign in to comment.