@theguild/components
Version:
40 lines (37 loc) • 1.29 kB
text/typescript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { Anchor } from './anchor.mjs';
import 'react';
import 'url';
import '../types/components.mjs';
import 'next/image';
import 'next/link';
import 'react-player';
declare const variantStyles: {
primary: string;
'primary-inverted': string;
secondary: string;
'secondary-inverted': string;
tertiary: string;
};
declare namespace CallToActionProps {
type Variant = keyof typeof variantStyles;
interface BaseProps {
variant: Variant;
}
interface AnchorProps extends BaseProps, React.ComponentPropsWithoutRef<typeof Anchor> {
href: string;
}
interface ButtonProps extends BaseProps, React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
href?: never;
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
}
}
type CallToActionProps = CallToActionProps.AnchorProps | CallToActionProps.ButtonProps;
/**
* This is called `Button` in Figma in the new Hive brand design system.
* It's a styled variant of {@link Anchor}.
*
* // TODO: Consider renaming it to `Button`.
*/
declare function CallToAction(props: CallToActionProps): react_jsx_runtime.JSX.Element;
export { CallToAction, CallToActionProps };