@stanfordspezi/spezi-web-design-system
Version:
Stanford Biodesign Digital Health Spezi Web Design System
32 lines (31 loc) • 796 B
TypeScript
import { ReactNode } from 'react';
interface StringChildrenProps {
children: string;
value?: string;
}
interface ReactNodeChildrenProps {
children: ReactNode;
value: string;
}
type CopyTextProps = (StringChildrenProps | ReactNodeChildrenProps) & {
className?: string;
};
/**
* Displays copiable text.
* Useful for displaying truncated ids in a compact manner,
* ensuring more screen estate.
*
* @example
* ```tsx
* // With default value
* <CopyText>50e8400-e29b-41d4-a716-446655440000</CopyText>
* ```
*
* @example
* ```tsx
* // With custom value
* <CopyText value="50e8400-e29b-41d4-a716-446655440000">Copy user UUID</CopyText>
* ```
*/
export declare const CopyText: ({ children, className, value }: CopyTextProps) => import("react").JSX.Element;
export {};