feat: keyboard shortcuts for primary actions (#2030)

This commit is contained in:
Mo
2022-11-18 09:01:48 -06:00
committed by GitHub
parent 0309912f98
commit f49ba6bd4d
67 changed files with 1296 additions and 555 deletions

View File

@@ -13,7 +13,7 @@ type Props = {
}
const RoundIconButton = forwardRef(
({ onClick, className, icon: iconType, iconClassName, id }: Props, ref: ForwardedRef<HTMLButtonElement>) => {
({ onClick, className, icon: iconType, iconClassName, id, label }: Props, ref: ForwardedRef<HTMLButtonElement>) => {
const click: MouseEventHandler = (e) => {
e.preventDefault()
onClick()
@@ -29,6 +29,8 @@ const RoundIconButton = forwardRef(
onClick={click}
ref={ref}
id={id}
title={label}
aria-label={label}
>
<Icon type={iconType} className={iconClassName} />
</button>