shortcut.tsx 367 B

123456789101112131415161718
  1. import classNames from 'classnames'
  2. export function Shortcut({ keys }: { keys: string[] }) {
  3. return (
  4. <span>
  5. {keys.map((key, idx) => (
  6. <span
  7. className={classNames({
  8. 'dropdown-shortcut-char': key.length === 1,
  9. })}
  10. key={`${key}${idx}`}
  11. >
  12. {key}
  13. </span>
  14. ))}
  15. </span>
  16. )
  17. }