Simplify folders and more typescript migration

This commit is contained in:
prototypa
2023-01-03 22:52:10 -05:00
parent 6777af58f3
commit 046009ec8c
37 changed files with 114 additions and 108 deletions

View File

@ -0,0 +1,22 @@
---
import { Icon } from 'astro-icon';
export interface Props {
label?: string;
class?: string;
iconClass?: string;
iconName?: string;
}
const {
label = 'Toggle between Dark and Light mode',
class:
className = 'text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center',
iconClass = 'w-6 h-6',
iconName = 'tabler:sun',
} = Astro.props;
---
<button type="button" class={className} aria-label={label} data-aw-toggle-color-scheme>
<Icon name={iconName} class={iconClass} />
</button>