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.
33 lines
777 B
33 lines
777 B
import type { PropsWithChildren } from 'preact/compat';
|
|
|
|
export interface LinkButtonProps {
|
|
"class"?: string
|
|
type?: "link"
|
|
href: string
|
|
external?: boolean
|
|
}
|
|
|
|
export interface FormButtonProps {
|
|
"class"?: string
|
|
type: HTMLButtonElement["type"]
|
|
href?: null
|
|
external?: null
|
|
}
|
|
|
|
export type ButtonProps = LinkButtonProps|FormButtonProps
|
|
|
|
export function Button({"class": className, type, href, external, children}: ButtonProps & PropsWithChildren) {
|
|
if (href) {
|
|
return <a
|
|
class={`button${className ? " " + className : ""}`}
|
|
href={href}
|
|
{...(external ? {rel: "external nofollow noreferrer"} : {})}
|
|
draggable={false}>
|
|
{children}
|
|
</a>
|
|
} else {
|
|
return <button type={type} class={`button${className ? " " + className : ""}`}>
|
|
{children}
|
|
</button>
|
|
}
|
|
}
|
|
|