summaryrefslogtreecommitdiff
path: root/examples/component/packages/my-component/Button.astro
blob: d853628a1875d5963b6bfedefb5a90d6a33fbb10 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
export interface Props extends Record<any, any> {
	type?: string
}

const {
	type,
	...props
} = {
	...Astro.props
} as Props

props.type = type || 'button'
---
<button {...props}><slot /></button>