import { bundledLanguages, createHighlighter, type ThemeRegistration } from 'shiki';
type CodeExampleType = {
title: string;
language: string;
code: string;
}[];
const getIconCodes = (): CodeExampleType => {
return [
{
language: 'js',
title: 'Vanilla',
code: `\
import { createIcons, icons } from 'lucide';
createIcons({ icons });
document.body.append('');\
`,
},
{
language: 'tsx',
title: 'React',
code: `import { $PascalCase } from 'lucide-react';
const App = () => {
return (
<$PascalCase />
);
};
export default App;
`,
},
{
language: 'vue',
title: 'Vue',
code: `
<$PascalCase />
`,
},
{
language: 'svelte',
title: 'Svelte',
code: `
<$PascalCase />
`,
},
{
language: 'tsx',
title: 'Preact',
code: `import { $PascalCase } from 'lucide-preact';
const App = () => {
return (
<$PascalCase />
);
};
export default App;
`,
},
{
language: 'tsx',
title: 'Solid',
code: `import { $PascalCase } from 'lucide-solid';
const App = () => {
return (
<$PascalCase />
);
};
export default App;
`,
},
{
language: 'tsx',
title: 'Angular',
code: `// app.module.ts
import { LucideAngularModule, $PascalCase } from 'lucide-angular';
@NgModule({
imports: [
LucideAngularModule.pick({ $PascalCase })
],
})
// app.component.html