Skip to content

Commit

Permalink
fix(tooltip): fix code review bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
masoudmanson committed Jul 3, 2024
1 parent d791aa7 commit b91ad36
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ exports[`<SegmentedControl /> Default story renders snapshot 1`] = `
/>
</div>
</span>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
<button
aria-label="List B"
Expand Down Expand Up @@ -63,6 +66,9 @@ exports[`<SegmentedControl /> Default story renders snapshot 1`] = `
/>
</div>
</span>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
<button
aria-label="List C"
Expand Down Expand Up @@ -92,6 +98,9 @@ exports[`<SegmentedControl /> Default story renders snapshot 1`] = `
/>
</div>
</span>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
<button
aria-label="List D"
Expand Down Expand Up @@ -121,6 +130,9 @@ exports[`<SegmentedControl /> Default story renders snapshot 1`] = `
/>
</div>
</span>
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
</div>
`;
2 changes: 1 addition & 1 deletion packages/components/src/core/SegmentedControl/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const SegmentedControl = (props: SegmentedControlProps) => {
arrow
key={value}
>
<ToggleButton aria-label={tooltipText} disableRipple value={value}>
<ToggleButton aria-label={tooltipText} value={value}>
<span tabIndex={-1}>{iconItem()}</span>
</ToggleButton>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Args } from "@storybook/react";
import Button from "src/core/Button";
import Icon from "src/core/Icon";
import RawTooltip from "src/core/Tooltip";

export const Tooltip = (props: Args): JSX.Element => {
Expand All @@ -23,13 +22,7 @@ export const Tooltip = (props: Args): JSX.Element => {
aria-label="tooltip test button"
sdsStyle="icon"
sdsSize="large"
icon={
<Icon
sdsIcon="ExclamationMarkCircle"
sdsSize="xl"
sdsType="interactive"
/>
}
icon="ExclamationMarkCircle"
/>
</RawTooltip>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`<Tooltip /> Default story renders snapshot 1`] = `
aria-label="tooltip test button"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-1ha43wd-MuiButtonBase-root-MuiIconButton-root"
data-mui-internal-clone-element="true"
icon="[object Object]"
icon="ExclamationMarkCircle"
tabindex="0"
type="button"
>
Expand All @@ -22,7 +22,7 @@ exports[`<Tooltip /> Default story renders snapshot 1`] = `
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-tr2xv3-MuiSvgIcon-root"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1q6hio5-MuiSvgIcon-root"
data-file-name="IconExclamationMarkCircleLarge"
data-testid="IconExclamationMarkCircleLarge"
fillcontrast="white"
Expand Down

0 comments on commit b91ad36

Please sign in to comment.