Files
landing/src/components/starwind/label/Label.astro
Raul Lugo dd227618cd
Some checks failed
Build & Deploy (prod) / deploy (push) Failing after 11s
feat: simple landing with contact form and applications showcase
2026-02-05 12:53:35 +01:00

23 lines
751 B
Plaintext

---
import type { HTMLAttributes } from "astro/types";
import { tv, type VariantProps } from "tailwind-variants";
type Props = HTMLAttributes<"label"> & VariantProps<typeof label>;
export const label = tv({
base: [
"text-foreground leading-none font-medium",
"peer-disabled:cursor-not-allowed peer-disabled:opacity-70 has-[+:disabled]:cursor-not-allowed has-[+:disabled]:opacity-70",
],
variants: { size: { sm: "text-sm", md: "text-base", lg: "text-lg" } },
defaultVariants: { size: "md" },
});
const { size, class: className, ...rest } = Astro.props;
---
{/* eslint-disable-next-line astro/jsx-a11y/label-has-associated-control */}
<label class={label({ size, class: className })} data-slot="label" {...rest}>
<slot />
</label>