Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -40,10 +40,7 @@ interface PluginButtonSlotProps {
|
||||
location: UILocation;
|
||||
}
|
||||
|
||||
function renderPluginButtonIcon(button: {
|
||||
icon?: string;
|
||||
lucideIcon?: string;
|
||||
}): React.ReactNode {
|
||||
function renderPluginButtonIcon(button: { icon?: string; lucideIcon?: string }): React.ReactNode {
|
||||
const lucideName =
|
||||
button.lucideIcon ??
|
||||
(typeof button.icon === 'string' && button.icon.startsWith('lucide:')
|
||||
@@ -55,9 +52,12 @@ function renderPluginButtonIcon(button: {
|
||||
}
|
||||
|
||||
if (lucideName) {
|
||||
const IconComponent = (lucide as Record<string, React.ComponentType<{ size?: number; strokeWidth?: number }> | undefined>)[
|
||||
lucideName
|
||||
];
|
||||
const IconComponent = (
|
||||
lucide as Record<
|
||||
string,
|
||||
React.ComponentType<{ size?: number; strokeWidth?: number }> | undefined
|
||||
>
|
||||
)[lucideName];
|
||||
if (IconComponent) {
|
||||
return <IconComponent size={18} strokeWidth={2} aria-hidden />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user