feat: workflow interaction (#4214)

This commit is contained in:
zxhlyh 2024-05-09 17:18:51 +08:00 • committed by GitHub
commit 9b24f12bf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
54 changed files with 1955 additions and 431 deletions

View file

@ -0,0 +1,32 @@
import { memo } from 'react'
import cn from 'classnames'
import { getKeyboardKeyNameBySystem } from './utils'
type ShortcutsNameProps = {
keys: string[]
className?: string
}
const ShortcutsName = ({
keys,
className,
}: ShortcutsNameProps) => {
return (
<div className={cn(
'flex items-center gap-0.5 h-4 text-xs text-gray-400',
className,
)}>
{
keys.map(key => (
<div
key={key}
className='capitalize'
>
{getKeyboardKeyNameBySystem(key)}
</div>
))
}
</div>
)
}
export default memo(ShortcutsName)