mirror of
https://github.com/logos-messaging/OpChan.git
synced 2026-01-05 14:23:06 +00:00
* chore: move to /app * chore: setup workspace * chore: move lib * wip * fix: build and memory leak * fix: app content hydration for message manager * fix: non-ens wallets engagement, syncing hydration * chore: improvements * chore: IdentityContext * chore: time range for sds store query to 1 month * chore: remove client prop * remove env logs * wip * FIX HYDRATION * fix: message signing * chore: rename providers * fix: hydration interface * state consistentcy * fix: ens * chore: minimal docs * chore: update readme * local build
29 lines
762 B
TypeScript
29 lines
762 B
TypeScript
import * as React from 'react';
|
|
import { Slot } from '@radix-ui/react-slot';
|
|
import { type VariantProps } from 'class-variance-authority';
|
|
|
|
import { cn } from '../../utils'
|
|
import { buttonVariants } from './button-variants';
|
|
|
|
export interface ButtonProps
|
|
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
VariantProps<typeof buttonVariants> {
|
|
asChild?: boolean;
|
|
}
|
|
|
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
const Comp = asChild ? Slot : 'button';
|
|
return (
|
|
<Comp
|
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
);
|
|
Button.displayName = 'Button';
|
|
|
|
export { Button };
|