К кнопке копирования URL добавлена подсказка

This commit is contained in:
Александр Сироткин 2022-11-21 08:47:59 +05:00
parent 11a632c246
commit 3216a90af3

View File

@ -1,5 +1,5 @@
import { cloneElement, memo, useCallback, useMemo, useState } from 'react'
import { Button, ButtonProps } from 'antd'
import { Button, ButtonProps, Tooltip } from 'antd'
import { CopyOutlined } from '@ant-design/icons'
import { invokeWebApiWrapperAsync, notify } from './factory'
@ -43,11 +43,9 @@ export type CopyUrlButtonProps = Omit<CopyUrlProps, 'children'> & ButtonProps
export const CopyUrlButton = memo<CopyUrlButtonProps>(({ sendLoading, hideUnsupported, onCopy, ...other }) => {
return (
<CopyUrl sendLoading={sendLoading} hideUnsupported={hideUnsupported} onCopy={onCopy}>
<Button
icon={<CopyOutlined />}
title={'Скопировать URL в буфер обмена'}
{...other}
/>
<Tooltip title={'Скопировать URL в буфер обмена'}>
<Button icon={<CopyOutlined />} {...other} />
</Tooltip>
</CopyUrl>
)
})