diff --git a/frontend/src/common/components/IAIIconButton.scss b/frontend/src/common/components/IAIIconButton.scss index 935bb056cf..6e5952e062 100644 --- a/frontend/src/common/components/IAIIconButton.scss +++ b/frontend/src/common/components/IAIIconButton.scss @@ -1,6 +1,6 @@ @use '../../styles/Mixins/' as *; -.icon-button { +.invokeai__icon-button { background-color: var(--btn-grey); cursor: pointer; @@ -14,15 +14,33 @@ background-color: var(--accent-color-hover); } } + &[disabled] { cursor: not-allowed; } &[data-variant='link'] { - background-color: none !important; + background: none !important; + } + + &[data-as-checkbox='true'] { + border: 2px solid var(--switch-bg-color); + background: none !important; + svg { + fill: var(--input-checkbox-bg); + } &:hover { - background-color: none !important; - background: none !important; + svg { + fill: var(--text-color-secondary); + } + border-color: var(--accent-color); + } + + &[data-selected='true'] { + border-color: var(--accent-color); + &:hover { + border-color: var(--accent-color-hover); + } } } } diff --git a/frontend/src/common/components/IAIIconButton.tsx b/frontend/src/common/components/IAIIconButton.tsx index d86d4cddea..6f38a74533 100644 --- a/frontend/src/common/components/IAIIconButton.tsx +++ b/frontend/src/common/components/IAIIconButton.tsx @@ -2,36 +2,39 @@ import { IconButtonProps, IconButton, Tooltip, - PlacementWithLogical, + TooltipProps, + ResponsiveValue, + ThemingProps, + isChakraTheme, } from '@chakra-ui/react'; +import { Variant } from 'framer-motion'; interface Props extends IconButtonProps { - tooltip?: string; - tooltipPlacement?: PlacementWithLogical | undefined; styleClass?: string; + tooltip?: string; + tooltipProps?: Omit; + asCheckbox?: boolean; + isChecked?: boolean; } -/** - * Reusable customized button component. Originally was more customized - now probably unecessary. - */ const IAIIconButton = (props: Props) => { const { tooltip = '', - tooltipPlacement = 'bottom', styleClass, - onClick, - cursor, + tooltipProps, + asCheckbox, + isChecked, ...rest } = props; return ( - + ); diff --git a/frontend/src/features/options/ProcessButtons/InvokeButton.tsx b/frontend/src/features/options/ProcessButtons/InvokeButton.tsx index 28ae5fbb2e..313e58da93 100644 --- a/frontend/src/features/options/ProcessButtons/InvokeButton.tsx +++ b/frontend/src/features/options/ProcessButtons/InvokeButton.tsx @@ -44,7 +44,7 @@ export default function InvokeButton(props: InvokeButton) { onClick={handleClickGenerate} className="invoke-btn invoke" tooltip="Invoke" - tooltipPlacement="bottom" + tooltipProps={{ placement: 'bottom' }} {...rest} /> ) : ( diff --git a/frontend/src/features/options/ProcessButtons/Loopback.tsx b/frontend/src/features/options/ProcessButtons/Loopback.tsx index 7899c8695b..6edf8690b4 100644 --- a/frontend/src/features/options/ProcessButtons/Loopback.tsx +++ b/frontend/src/features/options/ProcessButtons/Loopback.tsx @@ -15,9 +15,10 @@ const LoopbackButton = () => { return ( } onClick={() => { dispatch(setShouldLoopback(!shouldLoopback)); diff --git a/frontend/src/features/tabs/FloatingGalleryButton.tsx b/frontend/src/features/tabs/FloatingGalleryButton.tsx index 1ff0eec901..0f17e2271a 100644 --- a/frontend/src/features/tabs/FloatingGalleryButton.tsx +++ b/frontend/src/features/tabs/FloatingGalleryButton.tsx @@ -13,7 +13,7 @@ const FloatingGalleryButton = () => { return ( {