Skip to content

Commit

Permalink
start to fix console warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Nov 1, 2024
1 parent 8f75ce2 commit 1520aba
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
28 changes: 16 additions & 12 deletions components/src/atoms/buttons/EmptySelectorButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ export function EmptySelectorButton(
): JSX.Element {
const { onClick, text, iconName, textAlignment, disabled = false } = props

const StyledButton = styled.button`
border: none;
width: ${FLEX_MAX_CONTENT};
height: ${FLEX_MAX_CONTENT};
cursor: ${disabled ? CURSOR_DEFAULT : CURSOR_POINTER};
&:focus-visible {
outline: 2px solid ${COLORS.white};
box-shadow: 0 0 0 4px ${COLORS.blue50};
border-radius: ${BORDERS.borderRadius8};
}
`

return (
<StyledButton onClick={onClick}>

Check failure on line 33 in components/src/atoms/buttons/EmptySelectorButton.tsx

View workflow job for this annotation

GitHub Actions / js checks

No overload matches this call.
<Flex
Expand Down Expand Up @@ -70,3 +58,19 @@ export function EmptySelectorButton(
</StyledButton>
)
}

interface ButtonProps {
disabled: boolean
}

const StyledButton = styled.button<ButtonProps>`
border: none;
width: ${FLEX_MAX_CONTENT};
height: ${FLEX_MAX_CONTENT};
cursor: ${({ disabled }) => (disabled ? CURSOR_DEFAULT : CURSOR_POINTER)};
&:focus-visible {
outline: 2px solid ${COLORS.white};
box-shadow: 0 0 0 4px ${COLORS.blue50};
border-radius: ${BORDERS.borderRadius8};
}
`
2 changes: 1 addition & 1 deletion components/src/organisms/Toolbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ export function Toolbox(props: ToolboxProps): JSX.Element {
{secondaryHeaderButton != null ? secondaryHeaderButton : null}
{onCloseClick != null && closeButton != null ? (
<Btn
disabled={disableCloseButton}
onClick={onCloseClick}
textDecoration={textDecorationUnderline}
data-testid="Toolbox_closeButton"
whiteSpace={NO_WRAP}
disable={disableCloseButton}
>
{closeButton}
</Btn>
Expand Down
7 changes: 2 additions & 5 deletions protocol-designer/src/organisms/MaterialsListModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@ export function MaterialsListModal({
</Flex>
}
content={
<Flex
alignItems={ALIGN_CENTER}
grigGap={SPACING.spacing4}
>
<Flex alignItems={ALIGN_CENTER}>
<StyledText desktopStyle="bodyDefaultRegular">
{t(`shared:${fixture.name}`)}
</StyledText>
Expand Down Expand Up @@ -145,7 +142,7 @@ export function MaterialsListModal({
content={
<Flex
alignItems={ALIGN_CENTER}
grigGap={SPACING.spacing4}
gridGap={SPACING.spacing4}
>
<ModuleIcon moduleType={hw.type} size="1rem" />
<StyledText desktopStyle="bodyDefaultRegular">
Expand Down
4 changes: 2 additions & 2 deletions protocol-designer/src/pages/ProtocolOverview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export function ProtocolOverview(): JSX.Element {

useEffect(() => {
if (formValues?.created == null) {
console.warn(
'formValues was refreshed while on the overview page, redirecting to landing page'
console.log(
'formValues was possibly refreshed while on the overview page, redirecting to landing page'
)
navigate('/')
}
Expand Down
2 changes: 1 addition & 1 deletion step-generation/src/commandCreators/compound/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const transfer: CommandCreator<TransferArgs> = (
? [
curryCommandCreator(configureForVolume, {
pipetteId: args.pipette,
volume: args.volume,
volume: chunksPerSubTransfer,
}),
]
: []
Expand Down

0 comments on commit 1520aba

Please sign in to comment.