-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Opentrons ai client resizer (#16792)
# Overview This PR adds a resize bar to control the create protocol page columns width. ![image](https://github.com/user-attachments/assets/bb6bd43e-c593-4f05-80c5-504cf471c031) ## Test Plan and Hands on Testing - On the landing page click Create a new protocol button, you will be redirected to the new page - You can now drag the resize bar to adjust the columns width ## Changelog - Add resize bar ## Review requests - Verify resize bar. ## Risk assessment - low
- Loading branch information
1 parent
28261dc
commit 910c81e
Showing
3 changed files
with
159 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { | ||
COLORS, | ||
DISPLAY_FLEX, | ||
POSITION_ABSOLUTE, | ||
POSITION_RELATIVE, | ||
} from '@opentrons/components' | ||
|
||
export function ResizeBar({ | ||
handleMouseDown, | ||
}: { | ||
handleMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void | ||
}): JSX.Element { | ||
return ( | ||
<div | ||
style={{ | ||
width: '3px', | ||
cursor: 'col-resize', | ||
backgroundColor: COLORS.grey30, | ||
height: '100%', | ||
position: POSITION_RELATIVE, | ||
}} | ||
onMouseDown={handleMouseDown} | ||
> | ||
<div | ||
style={{ | ||
width: '16px', | ||
height: '24px', | ||
backgroundColor: COLORS.grey30, | ||
borderRadius: '16px', | ||
position: POSITION_ABSOLUTE, | ||
top: '50%', | ||
left: '50%', | ||
transform: 'translate(-50%, -50%)', | ||
display: DISPLAY_FLEX, | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
gap: '3px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
width: '2px', | ||
height: '10px', | ||
borderRadius: '12px', | ||
backgroundColor: COLORS.white, | ||
}} | ||
/> | ||
<div | ||
style={{ | ||
width: '2px', | ||
height: '10px', | ||
borderRadius: '12px', | ||
backgroundColor: COLORS.white, | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
) | ||
} |
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