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

View file

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