Skip to content

Commit

Permalink
chore: address comments from review
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdavies73 committed Nov 19, 2024
1 parent 183f165 commit 8b422f8
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 27 deletions.
1 change: 0 additions & 1 deletion src/components/accordion/accordion.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ const StyledAccordionTitleContainer = styled.div<StyledAccordionTitleContainerPr
iconAlign,
size,
hasButtonProps,
theme,
isExpanded,
variant,
}) => css`
Expand Down
9 changes: 3 additions & 6 deletions src/components/action-popover/action-popover.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,9 @@ const ButtonIcon = styled(Icon)`
`;

const StyledButtonIcon = styled.div`
${({ theme }) =>
`
&:focus {
${addFocusStyling()}
}
`}
&:focus {
${addFocusStyling()}
}
border-radius: var(--borderRadius050);
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/button/button.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type StyledButtonProps = SpaceProps &

const StyledButton = styled.button<StyledButtonProps>`
${space}
${({ disabled, noWrap, theme }) => css`
${({ disabled, noWrap }) => css`
align-items: center;
cursor: ${disabled ? "not-allowed" : "pointer"};
display: inline-flex;
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/card.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const StyledCardContent = styled.div.attrs(
return {};
},
)<StyledCardContentProps>`
${({ interactive, theme }) =>
${({ interactive }) =>
interactive &&
css`
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,9 @@ const StyledDayPicker = styled.div`
color: var(--colorsActionMajorYin090);
}
${({ theme }) =>
`
&:focus {
${addFocusStyling(true)}
}
`}
&:focus {
${addFocusStyling(true)}
}
+ * {
border-left: 1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test("the context callback is called with the expected arguments when isLastItem
});

// test purely for coverage - the `locked` prop is tested in both Chromatic and Playwright
test("should render a locked icon with expected styling when the `locked` prop is set and the focusRedesignOptOut flag is set", () => {
test("should render a locked icon with expected styling when the `locked` prop is set", () => {
render(
<PicklistItem type="add" onChange={() => {}} item={1} locked>
Item content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const StyledMenuModal = styled.div<{ menuType: MenuType }>`
}
}
${({ menuType, theme }) => css`
${({ menuType }) => css`
background-color: ${menuConfigVariants[menuType].background};
&& {
Expand Down
2 changes: 1 addition & 1 deletion src/components/split-button/split-button-toggle.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type StyledSplitButtonToggleProps = {
const StyledSplitButtonToggle = styled(
StyledButton,
)<StyledSplitButtonToggleProps>`
${({ buttonType, disabled, displayed, size, theme }) => css`
${({ buttonType, disabled, displayed, size }) => css`
border-top-left-radius: var(--borderRadius000);
border-bottom-left-radius: var(--borderRadius000);
Expand Down
8 changes: 1 addition & 7 deletions src/components/switch/switch.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,7 @@ export const StyledHintText = styled.div<StyledHintTextProps>`
`;

const StyledSwitch = styled.div`
${({
fieldHelpInline,
labelInline,
reverse,
size,
theme,
}: StyledSwitchProps) => css`
${({ fieldHelpInline, labelInline, reverse, size }: StyledSwitchProps) => css`
${margin}
${FieldLineStyle} {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/components/text-editor/text-editor.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const StyledEditorOutline = styled.div<{
isFocused?: boolean;
hasError?: boolean;
}>`
${({ isFocused, hasError, theme }) => css`
${({ isFocused, hasError }) => css`
border-radius: var(--borderRadius050);
outline: none;
Expand Down
2 changes: 1 addition & 1 deletion src/components/tile-select/tile-select.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const StyledFocusWrapper = styled.div<{
checked?: boolean;
hasFocus: boolean;
}>`
${({ checked, hasFocus, theme }) => css`
${({ checked, hasFocus }) => css`
position: relative;
border: 1px solid var(--colorsActionMinor250);
border-radius: var(--borderRadius100);
Expand Down

0 comments on commit 8b422f8

Please sign in to comment.