Files
kycnotme/web/src/components/InputSubmitButton.astro

27 lines
621 B
Plaintext
Raw Normal View History

2025-05-19 10:23:36 +00:00
---
import { cn } from '../lib/cn'
import Button from './Button.astro'
import type { HTMLAttributes } from 'astro/types'
type Props = HTMLAttributes<'div'> & {
hideCancel?: boolean
icon?: string
label?: string
}
const {
hideCancel = false,
icon = 'ri:send-plane-2-line',
label = 'Submit',
class: className,
...htmlProps
} = Astro.props
---
<div class={cn('flex justify-between gap-2', className)} {...htmlProps}>
{!hideCancel && <Button as="a" href="/" label="Cancel" icon="ri:close-line" color="gray" />}
<Button type="submit" label={label} icon={icon} class="ml-auto" color="success" />
</div>