28 lines
654 B
TypeScript
28 lines
654 B
TypeScript
|
|
import React from 'react';
|
||
|
|
import { TruncatedPath } from './TruncatedPath';
|
||
|
|
|
||
|
|
interface CopyButtonWithModalProps {
|
||
|
|
label: string;
|
||
|
|
text: string;
|
||
|
|
variant?: 'blue' | 'yellow';
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Wrapper component for TruncatedPath with label support.
|
||
|
|
* This component is kept for backward compatibility.
|
||
|
|
* Internally uses TruncatedPath for consistent behavior.
|
||
|
|
*/
|
||
|
|
export const CopyButtonWithModal: React.FC<CopyButtonWithModalProps> = ({
|
||
|
|
label,
|
||
|
|
text,
|
||
|
|
variant = 'blue'
|
||
|
|
}) => {
|
||
|
|
return (
|
||
|
|
<TruncatedPath
|
||
|
|
path={text}
|
||
|
|
variant={variant}
|
||
|
|
label={label}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
};
|