import * as React from 'react'; import copy from 'clipboard-copy'; import Box, { BoxProps } from '@mui/material/Box'; import Button from '@mui/material/Button'; import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded'; import ContentCopyRounded from '@mui/icons-material/ContentCopyRounded'; import CheckRounded from '@mui/icons-material/CheckRounded'; import { Link } from '@mui/docs/Link'; import NpmCopyButton from 'docs/src/components/action/NpmCopyButton'; interface GetStartedButtonsProps extends BoxProps { primaryLabel?: string; primaryUrl: string; primaryUrlTarget?: string; secondaryLabel?: string; secondaryUrl?: string; secondaryUrlTarget?: string; installation?: string; altInstallation?: string; } export default function GetStartedButtons(props: GetStartedButtonsProps) { const [copied, setCopied] = React.useState(false); const { primaryLabel = 'Get started', primaryUrl, primaryUrlTarget = '_self', secondaryLabel, secondaryUrl, secondaryUrlTarget = '_self', installation, altInstallation, ...other } = props; const handleCopy = () => { setCopied(true); copy(installation!).then(() => { setTimeout(() => setCopied(false), 2000); }); }; return ( *': { minWidth: { xs: '100%', md: '0%' }, }, ...other.sx, }} > {installation ? ( ) : null} {secondaryLabel ? ( ) : null} {altInstallation && } ); }