Skip to content

Commit

Permalink
IconButtonFloating: reverting circle to squircle (#3784)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertCarreras authored Oct 1, 2024
1 parent 9c8baac commit f784f35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 0 additions & 3 deletions packages/gestalt/src/IconButton/InternalIconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ type Props = {
zIndex?: Indexable;
};
type?: 'submit' | 'button';
variant?: 'floating' | 'default';
};

const InternalIconButtonWithForwardRef = forwardRef<HTMLButtonElement, Props>(function IconButton(
Expand All @@ -78,7 +77,6 @@ const InternalIconButtonWithForwardRef = forwardRef<HTMLButtonElement, Props>(fu
tabIndex = 0,
tooltip,
type,
variant,
}: Props,
ref,
) {
Expand Down Expand Up @@ -179,7 +177,6 @@ const InternalIconButtonWithForwardRef = forwardRef<HTMLButtonElement, Props>(fu
icon={icon}
iconColor={iconColor}
padding={padding}
rounding={variant === 'floating' ? 'circle' : undefined}
selected={selected}
size={size}
/>
Expand Down
9 changes: 7 additions & 2 deletions packages/gestalt/src/IconButtonFloating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { forwardRef } from 'react';
import Box from './Box';
import InternalIconButton from './IconButton/InternalIconButton';
import icons from './icons/index';
import useInExperiment from './useInExperiment';
import { Indexable } from './zIndex';

type Props = {
Expand Down Expand Up @@ -84,8 +85,13 @@ const IconButtonFloatingWithForwardRef = forwardRef<HTMLButtonElement, Props>(
}: Props,
ref,
) {
const isInVRExperiment = useInExperiment({
webExperimentName: 'web_gestalt_visualRefresh',
mwebExperimentName: 'web_gestalt_visualRefresh',
});

return (
<Box borderStyle="shadow" color="default" rounding="circle">
<Box borderStyle="shadow" color="default" rounding={isInVRExperiment ? 4 : 'circle'}>
<InternalIconButton
ref={ref}
accessibilityControls={accessibilityControls}
Expand All @@ -100,7 +106,6 @@ const IconButtonFloatingWithForwardRef = forwardRef<HTMLButtonElement, Props>(
selected={selected}
size="xl"
tooltip={tooltip}
variant="floating"
/>
</Box>
);
Expand Down

0 comments on commit f784f35

Please sign in to comment.