Compare commits
14 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
517d2deed2 | 2 days ago |
|
|
7193b62821 | 2 days ago |
|
|
98aec9b037 | 1 month ago |
|
|
a3ef048865 | 1 month ago |
|
|
ea00e7d2fd | 1 month ago |
|
|
c600958384 | 1 month ago |
|
|
576532ebe6 | 1 month ago |
|
|
7769929d00 | 1 month ago |
|
|
f1eb47c17f | 2 months ago |
|
|
a9c4c71921 | 2 months ago |
|
|
4afa544641 | 2 months ago |
|
|
78f10715e7 | 3 months ago |
|
|
144abacf90 | 3 months ago |
|
|
96a050afa9 | 3 months ago |
@ -0,0 +1,24 @@
|
||||
import { createContext, useEffect, useState } from 'react'
|
||||
import { Tooltip, Button } from 'antd'
|
||||
import useUrlStore from '@/stores/UrlStore'
|
||||
|
||||
const ShortlinkBtn = ({ type, ...props }) => {
|
||||
const [openShorturlDrawer] = useUrlStore((state) => [state.openDrawer])
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip title='短链接'>
|
||||
{type === 'link' ? (
|
||||
<Button type={'link'} onClick={() => openShorturlDrawer()}>
|
||||
短链接
|
||||
</Button>
|
||||
) : (
|
||||
<Button type='text' onClick={() => openShorturlDrawer()} size={'middle'} className='px-1'>
|
||||
🔗
|
||||
</Button>
|
||||
)}
|
||||
</Tooltip>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default ShortlinkBtn
|
||||
Loading…
Reference in New Issue