-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(protocol-designer): add labware details card
* remove old LabwareNameEditForm and its reducers + actions + selectors Closes #2428
- Loading branch information
Showing
12 changed files
with
90 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
protocol-designer/src/components/IngredientsList/LabwareDetailsCard/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// @flow | ||
import {connect} from 'react-redux' | ||
import assert from 'assert' | ||
import LabwareDetailsCard from './LabwareDetailsCard' | ||
import {selectors as labwareIngredSelectors} from '../../../labware-ingred/reducers' | ||
import type {ElementProps} from 'react' | ||
import type {BaseState} from '../../../types' | ||
|
||
type Props = ElementProps<typeof LabwareDetailsCard> | ||
|
||
function mapStateToProps (state: BaseState): Props { | ||
const labwareData = labwareIngredSelectors.getSelectedContainer(state) | ||
assert(labwareData, 'Expected labware data to exist in connected labware details card') | ||
|
||
return labwareData | ||
? { | ||
labwareType: labwareData.type, | ||
nickname: labwareData.name || 'Unnamed Labware', | ||
} | ||
: { | ||
labwareType: '?', | ||
nickname: '?', | ||
} | ||
} | ||
|
||
export default connect(mapStateToProps)(LabwareDetailsCard) |
11 changes: 11 additions & 0 deletions
11
protocol-designer/src/components/IngredientsList/LabwareDetailsCard/labwareDetailsCard.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@import '@opentrons/components'; | ||
@import '../../../css/grid.css'; | ||
|
||
.row { | ||
lost-utility: clearfix; | ||
text-align: left; | ||
} | ||
|
||
.label { | ||
font-weight: var(--fw-bold); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 0 additions & 109 deletions
109
protocol-designer/src/containers/LabwareNameEditForm.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.