diff --git a/src/components/atoms/icon-button.astro b/src/components/atoms/icon-button.astro new file mode 100644 index 0000000..df5b3ef --- /dev/null +++ b/src/components/atoms/icon-button.astro @@ -0,0 +1,40 @@ +--- +import Icon from './icon'; + +type IconButtonSize = 'small' | 'large'; + +export interface Props extends astroHTML.JSX.AnchorHTMLAttributes { + icon: string; + name: string; + size: IconButtonSize; +} + +const sizeMap: Record = { + small: 'w-7 h-7', + large: 'w-9 h-9', +}; + +const { icon, name, size, ...props } = Astro.props; +--- + + + + diff --git a/src/pages/playground/icon-button.astro b/src/pages/playground/icon-button.astro new file mode 100644 index 0000000..ce27ef3 --- /dev/null +++ b/src/pages/playground/icon-button.astro @@ -0,0 +1,10 @@ +--- +import IconButton from '@/atoms/icon-button.astro'; +--- + +
+ + + + +