mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
chore(UI, accessibility): more items
- radio icon buttons - links should be parent of icon styled links to still line up with sibling components
This commit is contained in:
@@ -8,13 +8,14 @@ import {
|
||||
import { memo } from 'react';
|
||||
|
||||
export type IAIIconButtonProps = IconButtonProps & {
|
||||
role?: string;
|
||||
tooltip?: string;
|
||||
tooltipProps?: Omit<TooltipProps, 'children'>;
|
||||
isChecked?: boolean;
|
||||
};
|
||||
|
||||
const IAIIconButton = forwardRef((props: IAIIconButtonProps, forwardedRef) => {
|
||||
const { tooltip = '', tooltipProps, isChecked, ...rest } = props;
|
||||
const { role, tooltip = '', tooltipProps, isChecked, ...rest } = props;
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
@@ -27,6 +28,7 @@ const IAIIconButton = forwardRef((props: IAIIconButtonProps, forwardedRef) => {
|
||||
>
|
||||
<IconButton
|
||||
ref={forwardedRef}
|
||||
role={role}
|
||||
aria-checked={isChecked !== undefined ? isChecked : undefined}
|
||||
{...rest}
|
||||
/>
|
||||
@@ -34,4 +36,5 @@ const IAIIconButton = forwardRef((props: IAIIconButtonProps, forwardedRef) => {
|
||||
);
|
||||
});
|
||||
|
||||
IAIIconButton.displayName = 'IAIIconButton';
|
||||
export default memo(IAIIconButton);
|
||||
|
||||
Reference in New Issue
Block a user