Skip to content

Commit

Permalink
removed last Legacy Colors outside of components, do the same for com…
Browse files Browse the repository at this point in the history
…ponents in CL
  • Loading branch information
b-cooper committed Jan 12, 2024
1 parent 4048ff0 commit 847042b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions app/src/DesignTokens/Colors/Colors.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import {
Flex,
LEGACY_COLORS,
COLORS,
DIRECTION_COLUMN,
DIRECTION_ROW,
SPACING,
Expand Down Expand Up @@ -51,7 +51,7 @@ const Template: Story<ColorsStorybookProps> = args => {
}

const handleClick = (colorName: string): void => {
navigator.clipboard.writeText(`LEGACY_COLORS.${colorName}`)
navigator.clipboard.writeText(`COLORS.${colorName}`)
setCopiedColor(colorName)
setTimeout(() => {
setCopiedColor(null)
Expand Down Expand Up @@ -109,7 +109,7 @@ const Template: Story<ColorsStorybookProps> = args => {
}

export const AllColors = Template.bind({})
const allColors = Object.entries(LEGACY_COLORS)
const allColors = Object.entries(COLORS)
AllColors.args = {
colors: allColors,
}
2 changes: 1 addition & 1 deletion app/src/atoms/MenuList/OverflowBtn.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { css } from 'styled-components'
import { Btn, LEGACY_COLORS, SPACING } from '@opentrons/components'
import { Btn, COLORS, SPACING } from '@opentrons/components'

export const OverflowBtn = React.forwardRef(
(
Expand Down
10 changes: 5 additions & 5 deletions app/src/atoms/buttons/SmallButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { css } from 'styled-components'
import {
TYPOGRAPHY,
LEGACY_COLORS,
COLORS,
SPACING,
BORDERS,
Btn,
Expand Down Expand Up @@ -80,16 +80,16 @@ export function SmallButton(props: SmallButtonProps): JSX.Element {
},
tertiaryHighLight: {
defaultColor: COLORS.black90,
defaultBackgroundColor: `${COLORS.blue50}${LEGACY_COLORS.opacity0HexCode}`,
defaultBackgroundColor: `${COLORS.blue50}00`,
activeBackgroundColor: `${COLORS.grey35}`,
disabledBackgroundColor: `${COLORS.blue50}${LEGACY_COLORS.opacity0HexCode}`,
disabledBackgroundColor: `${COLORS.blue50}00`,
disabledColor: `${COLORS.grey50}`,
},
tertiaryLowLight: {
defaultColor: `${COLORS.grey60}`,
defaultBackgroundColor: ` ${COLORS.blue50}${LEGACY_COLORS.opacity0HexCode}`,
defaultBackgroundColor: ` ${COLORS.blue50}00`,
activeBackgroundColor: `${COLORS.grey35}`,
disabledBackgroundColor: `${COLORS.blue50}${LEGACY_COLORS.opacity0HexCode}`,
disabledBackgroundColor: `${COLORS.blue50}00`,
disabledColor: `${COLORS.grey50}`,
},
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/Modal/ModalHeader.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
COLORS.black90,
COLORS.blue50,
COLORS.red50,
LEGACY_COLORS.successText,
COLORS.green60,
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function FixtureListItem({
status={t('configured')}
backgroundColor={COLORS.green20}
iconColor={COLORS.green50}
textColor={LEGACY_COLORS.successText}
textColor={COLORS.green60}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export function ModulesListItem({
status={moduleConnectionStatus}
backgroundColor={COLORS.green20}
iconColor={COLORS.green50}
textColor={LEGACY_COLORS.successText}
textColor={COLORS.green60}
/>
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Flex,
SPACING,
TYPOGRAPHY,
LEGACY_COLORS,
COLORS,
DIRECTION_COLUMN,
DIRECTION_ROW,
ALIGN_CENTER,
Expand Down Expand Up @@ -76,7 +76,7 @@ function ListItem({ itemName, itemValue }: ListItemProps): JSX.Element {
flexDirection={DIRECTION_ROW}
alignItems={ALIGN_CENTER}
padding={`${SPACING.spacing16} ${SPACING.spacing24}`}
backgroundColor={LEGACY_COLORS.grey3}
backgroundColor={COLORS.grey40}
justifyContent={JUSTIFY_SPACE_BETWEEN}
borderRadius={BORDERS.borderRadiusSize3}
>
Expand Down
3 changes: 1 addition & 2 deletions app/src/organisms/RunPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
TYPOGRAPHY,
BORDERS,
COLORS,
LEGACY_COLORS,
POSITION_FIXED,
} from '@opentrons/components'

Expand Down Expand Up @@ -119,7 +118,7 @@ export const RunPreviewComponent = (
width="100%"
border={`solid 1px ${
index === jumpedIndex
? LEGACY_COLORS.electricPurple
? COLORS.purple40
: borderColor
}`}
backgroundColor={
Expand Down

0 comments on commit 847042b

Please sign in to comment.