Skip to content

Commit

Permalink
lint and style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Jul 18, 2024
1 parent 5cdcaad commit 9b92a55
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
20 changes: 8 additions & 12 deletions app/src/molecules/InterventionModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { useSelector } from 'react-redux'
import {css} from 'styled-components'
import { css } from 'styled-components'

import {
ALIGN_CENTER,
Expand All @@ -16,7 +16,7 @@ import {
POSITION_STICKY,
SPACING,
DIRECTION_COLUMN,
RESPONSIVENESS
RESPONSIVENESS,
} from '@opentrons/components'

import { getIsOnDevice } from '../../redux/config'
Expand Down Expand Up @@ -143,7 +143,6 @@ export function InterventionModal({
const isOnDevice = useSelector(getIsOnDevice)
const modalStyle = isOnDevice ? MODAL_ODD_STYLE : MODAL_DESKTOP_STYLE
const headerStyle = isOnDevice ? BASE_HEADER_STYLE : DESKTOP_HEADER_STYLE
const titleSpacing = isOnDevice ? SPACING.spacing12 : SPACING.spacing4

return (
<Flex {...WRAPPER_STYLE}>
Expand All @@ -162,13 +161,9 @@ export function InterventionModal({
justifyContent={headerJustifyContent}
>
{titleHeading}
<Flex
alignItems={ALIGN_CENTER}
gridGap={titleSpacing}
onClick={iconHeadingOnClick}
>
<Flex alignItems={ALIGN_CENTER} onClick={iconHeadingOnClick}>
{iconName != null ? (
<Icon name={iconName} css={ICON_SIZE} />
<Icon name={iconName} css={ICON_STYLE} />
) : null}
{iconHeading ?? null}
</Flex>
Expand All @@ -180,12 +175,13 @@ export function InterventionModal({
)
}


const ICON_SIZE = css`
const ICON_STYLE = css`
width: 1rem;
height: 1rem;
margin: ${SPACING.spacing4};
@media (${RESPONSIVENESS.touchscreenMediaQuerySpecs}) {
width: 2rem;
height: 2rem;
margin: ${SPACING.spacing12};
}
`
`
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { ODD_SECTION_TITLE_STYLE, RECOVERY_MAP } from '../constants'
import {
RecoveryFooterButtons,
RecoverySingleColumnContentWrapper,
RecoveryRadioGroup
RecoveryRadioGroup,
} from '../shared'
import { DropTipWizardFlows } from '../../DropTipWizardFlows'
import { DT_ROUTES } from '../../DropTipWizardFlows/constants'
Expand Down Expand Up @@ -141,7 +141,6 @@ export function BeginRemoval({
css={DESKTOP_ONLY}
>
<RecoveryRadioGroup
useBlueChecked
css={css`
padding: ${SPACING.spacing4};
`}
Expand Down
2 changes: 1 addition & 1 deletion components/src/forms/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function RadioGroup(props: RadioGroupProps): JSX.Element {
onChange={props.onChange}
/>
<div className={cx(props.labelTextClassName, styles.label_text)}>
{radio.name}
{radio.name}
</div>
{radio.children}
</label>
Expand Down

0 comments on commit 9b92a55

Please sign in to comment.