feat: pre-existing local changes — fischerei, verband, modules, members, packages
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 6m20s
Workflow / ⚫️ Test (push) Has been skipped

Commits all remaining uncommitted local work:

- apps/web: fischerei, verband, modules, members-cms, documents,
  newsletter, meetings, site-builder, courses, bookings, events,
  finance pages and components
- apps/web: marketing page updates, layout, paths config,
  next.config.mjs, styles/makerkit.css
- apps/web/i18n: documents, fischerei, marketing, verband (de+en)
- packages/features: finance, fischerei, member-management,
  module-builder, newsletter, sitzungsprotokolle, verbandsverwaltung
  server APIs and components
- packages/ui: button.tsx updates
- pnpm-lock.yaml
This commit is contained in:
Zaid Marzguioui
2026-04-02 01:19:54 +02:00
parent a1719671df
commit b26e5aaafa
153 changed files with 2329 additions and 1227 deletions

View File

@@ -1,5 +1,7 @@
'use client';
import * as React from 'react';
import { cn } from '#lib/utils';
import { Button as ButtonPrimitive } from '@base-ui/react/button';
import { type VariantProps, cva } from 'class-variance-authority';
@@ -43,18 +45,52 @@ const buttonVariants = cva(
},
);
export interface ButtonProps
extends ButtonPrimitive.Props, VariantProps<typeof buttonVariants> {
/**
* When true, the button will delegate rendering to its child element,
* applying button styles to that child. Implemented via Base UI's `render` prop.
*/
asChild?: boolean;
}
function Button({
className,
variant = 'default',
size = 'default',
asChild = false,
children,
...props
}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
}: ButtonProps) {
// When asChild is true, use Base UI's render prop to delegate to the child element
const renderProp =
asChild && React.isValidElement(children)
? React.cloneElement(
children as React.ReactElement<{ className?: string }>,
{
className: cn(
buttonVariants({ variant, size, className }),
(children as React.ReactElement<{ className?: string }>).props
.className,
),
},
)
: undefined;
if (renderProp) {
return (
<ButtonPrimitive data-slot="button" render={renderProp} {...props} />
);
}
return (
<ButtonPrimitive
data-slot="button"
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
>
{children}
</ButtonPrimitive>
);
}