Scenario generator for vore roleplay and story ideas. https://scenario-generator.deliciousreya.net/responses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.2 KiB

import type { PropsWithChildren } from 'preact/compat';
export interface LinkButtonProps {
"class"?: string
id?: string
href: string
external?: boolean
onClick?: (ev: Event) => void
}
export interface FormButtonProps {
"class"?: string
id?: string
type?: HTMLButtonElement["type"]
href?: null
external?: null
name?: string
value?: string
disabled?: boolean
onClick?: (ev: Event) => void
}
export function LinkButton({"class": className, id, href, external, onClick, children}: LinkButtonProps & PropsWithChildren) {
return <a
class={`button${className ? " " + className : ""}`}
href={href}
{...(external ? {rel: "external nofollow noreferrer"} : {})}
{...(id ? {id} : {})}
{...(onClick ? {onClick} : {})}
draggable={false}>
{children}
</a>
}
export function FormButton({"class": className, id, name, value, disabled, type = "button", onClick, children}: FormButtonProps & PropsWithChildren) {
return <button
type={type}
{...(id ? {id} : {})}
{...(onClick ? {onClick} : {})}
{...(name ? {name} : {})}
{...(value ? {value} : {})}
{...(typeof disabled === "boolean" ? {disabled} : {})}
class={`button${className ? " " + className : ""}`}>
{children}
</button>
}