add actiongroup focus

This commit is contained in:
Timothy Z. 2026-04-28 23:41:30 +03:00
parent 4b92d9dd4f
commit 972bd23991
2 changed files with 11 additions and 1 deletions

View file

@ -27,18 +27,27 @@
width: @width;
padding: 0 1rem;
cursor: pointer;
border-radius: 2rem;
outline: none;
.icon {
width: calc(@width / 2);
height: calc(@height / 2);
color: var(--primary-foreground-color);
opacity: 0.7;
}
&:hover {
&:hover, &:focus {
.icon {
opacity: 1;
}
}
&:focus-visible {
outline: 2px solid var(--primary-foreground-color);
outline-offset: -2px;
}
&.disabled {
pointer-events: none;
}

View file

@ -28,6 +28,7 @@ const ActionsGroup = ({ items, className }: Props) => {
<div
key={index}
className={classNames(styles['icon-container'], item.className, { [styles['disabled']]: item.disabled })}
tabIndex={0}
onClick={item.onClick}
>
{