1.0.8 • Published 10 months ago
nk-plus-antd v1.0.8
nk-plus-antd
a project for components or function for antd, The parent element must contain a fixed width, height, overflow: hidden, Exceeding the parent element will display 'tooptip'.
First must rely on antd@5.19.x, tailwindcss.
pnpm, yarn, npm
pnpm add nk-plus-antd
yarn add nk-plus-antd
npm install nk-plus-antd
TextEllipsis components
import { TextEllipsis, type TextEllipsisType } from 'nk-plus-antd'
<TextEllipsis hover text='hello nk' placement='bottomLeft' />
CodeBrowse components
Only supports javascript typescript code
import { CodeBrowse, type IcodeBrowse } from 'nk-plus-antd'
<CodeBrowse code="const a = 1" title="test.js" callCopy={copyCallback} />
useClipboard hook
import { useClipboard } from 'nk-plus-antd'
const { copy, reset, error, copied } = useClipboard({ timeout: timeout })
useSyncScrolling hook
import { useSyncScrolling } from 'nk-plus-antd'
useSyncScrolling(left: HTMLElement, right: HTMLElement)
cn function
Functions for handling merged styles