Skip to content

Commit

Permalink
refactor(app): export internal components in RobotSettingsDashboard (#…
Browse files Browse the repository at this point in the history
…12681)

Make RobotSettingButton & SettingsConten into an external component
  • Loading branch information
koji committed May 11, 2023
1 parent 761e30d commit b84734e
Show file tree
Hide file tree
Showing 14 changed files with 444 additions and 434 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { useDispatchApiRequest } from '../../../redux/robot-api'

import type { Dispatch, State } from '../../../redux/types'
import type { ResetConfigRequest } from '../../../redux/robot-admin/types'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

interface LabelProps {
isSelected?: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

import { StyledText } from '../../../atoms/text'

import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

interface EnableDeveloperToolsProps {
setCurrentOption: (currentOption: SettingOption | null) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { WifiConnectionDetails } from './WifiConnectionDetails'
import type { IconName } from '@opentrons/components'
import type { NetworkConnection } from '../../../../pages/OnDeviceDisplay/hooks'
import type { ChipType } from '../../../../atoms/Chip'
import type { SettingOption } from '../../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

export type ConnectionType = 'wifi' | 'ethernet' // TODO (kj: 04/05/2023) add 'usb' as options once implemented

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

import { StyledText } from '../../../atoms/text'

import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

interface RobotNameProps {
setCurrentOption: (currentOption: SettingOption | null) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { StyledText } from '../../../atoms/text'
import { RobotSystemVersionModal } from './RobotSystemVersionModal'
import { getShellUpdateState } from '../../../redux/shell'

import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

const GITHUB_URL = 'https://github.com/Opentrons/opentrons'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {

import { StyledText } from '../../../atoms/text'

import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

interface RectProps {
isActive: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { SLEEP_NEVER_MS } from '../../../App/constants'

import type { Dispatch } from '../../../redux/types'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

const SLEEP_TIME_MS = 60 * 1000 // 1 min

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
} from '../../../redux/config'

import type { Dispatch } from '../../../redux/types'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

const BUTTON_STYLE = css`
&:focus-visible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from '../../../redux/config'

import type { Dispatch } from '../../../redux/types'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard'
import type { SettingOption } from '../../../pages/OnDeviceDisplay/RobotSettingsDashboard/RobotSettingButton'

interface LabelProps {
isSelected?: boolean
Expand Down
Loading

0 comments on commit b84734e

Please sign in to comment.