diff --git a/protocol-designer/src/components/ColorPicker/ColorPicker.css b/protocol-designer/src/components/ColorPicker/ColorPicker.css index 8d46c153004..36fef55d50c 100644 --- a/protocol-designer/src/components/ColorPicker/ColorPicker.css +++ b/protocol-designer/src/components/ColorPicker/ColorPicker.css @@ -1,6 +1,7 @@ .swatch { display: inline-block; cursor: pointer; + box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.41); } .color { @@ -10,14 +11,14 @@ } .popover { - margin-top: 10px; - padding-right: 100px; + margin-top: 15px; position: absolute; + right: 24px; } .cover { position: fixed; - top: 0px; + top: 10px; right: 0px; bottom: 0px; left: 0px; diff --git a/protocol-designer/src/components/ColorPicker/index.tsx b/protocol-designer/src/components/ColorPicker/index.tsx index ab4c06b8fb5..16504f537f4 100644 --- a/protocol-designer/src/components/ColorPicker/index.tsx +++ b/protocol-designer/src/components/ColorPicker/index.tsx @@ -1,6 +1,6 @@ import * as React from 'react' import { ColorResult, TwitterPicker } from 'react-color' -import { colors } from '../swatchColors' +import { COLORS } from '@opentrons/components' import styles from './ColorPicker.css' @@ -32,13 +32,13 @@ export function ColorPicker(props: ColorPickerProps): JSX.Element { onClick={() => setShowColorPicker(false)} /> { props.onChange(color.hex) setShowColorPicker(showColorPicker => !showColorPicker) }} - triangle="top-left" + triangle="top-right" /> ) : null} diff --git a/protocol-designer/src/components/IngredientsList/index.tsx b/protocol-designer/src/components/IngredientsList/index.tsx index 61e30b02f35..8c8b1b99ed1 100644 --- a/protocol-designer/src/components/IngredientsList/index.tsx +++ b/protocol-designer/src/components/IngredientsList/index.tsx @@ -1,12 +1,12 @@ // TODO: Ian 2018-10-09 figure out what belongs in LiquidsSidebar vs IngredientsList after #2427 import * as React from 'react' - +import { useSelector } from 'react-redux' +import { selectors } from '../../labware-ingred/selectors' import { IconButton, SidePanel } from '@opentrons/components' import { sortWells } from '@opentrons/shared-data' import { i18n } from '../../localization' import { PDTitledList, PDListItem } from '../lists' import { TitledListNotes } from '../TitledListNotes' -import { swatchColors } from '../swatchColors' import { LabwareDetailsCard } from './LabwareDetailsCard' import styles from './IngredientsList.css' import { LiquidGroupsById, LiquidGroup } from '../../labware-ingred/types' @@ -48,6 +48,8 @@ const LiquidGroupCard = (props: LiquidGroupCardProps): JSX.Element | null => { .sort(sortWells) .filter(well => labwareWellContents[well][groupId]) + const liquidGroups = useSelector(selectors.getLiquidGroupsById) + if (wellsWithIngred.length < 1) { // do not show liquid card if it has no instances for this labware return null @@ -56,7 +58,7 @@ const LiquidGroupCard = (props: LiquidGroupCardProps): JSX.Element | null => { return ( {i18n.t('form.liquid_edit.details')} -
+
- + = createSelector( [liquidId]: { displayName: liquidData.name, description: liquidData.description ?? '', - displayColor: swatchColors(liquidId), + displayColor: liquidData.displayColor, }, } }, diff --git a/protocol-designer/src/localization/en/form.json b/protocol-designer/src/localization/en/form.json index 8549d16ec49..694756b34db 100644 --- a/protocol-designer/src/localization/en/form.json +++ b/protocol-designer/src/localization/en/form.json @@ -15,6 +15,7 @@ "liquid_edit": { "details": "Details", "description": "Description", + "displayColor": "Color", "name": "Liquid name", "serialize": "Serialize", "serialize_title": "Serialization",