Skip to content

Commit

Permalink
fix: improve wrapping of small prediction panel toolbar (#2954)
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Mar 8, 2024
1 parent f269492 commit 31be6ba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions src/component/modal/AboutPredictionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ function AboutPredictionModal() {
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
return (
<>
<Toolbar>
<Toolbar.Item
icon={<FaInfo />}
onClick={openDialog}
title="About Prediction"
/>
</Toolbar>
<Toolbar.Item
icon={<FaInfo />}
onClick={openDialog}
title="About Prediction"
/>
<Dialog
isOpen={isOpenDialog}
onClose={closeDialog}
Expand Down
8 changes: 1 addition & 7 deletions src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ export default function MoleculePanelHeader({

return (
<PanelHeader>
{renderSource === 'predictionPanel' && <AboutPredictionModal />}
<Toolbar>
{renderSource === 'predictionPanel' && <AboutPredictionModal />}
{renderSource === 'moleculePanel' && (
<>
<ToolbarPopoverItem
Expand All @@ -239,11 +239,6 @@ export default function MoleculePanelHeader({
icon={<FaPlus />}
onClick={onOpenMoleculeEditor}
/>
</>
)}

{renderSource === 'moleculePanel' && (
<>
<Toolbar.Item
title="Delete molecule"
icon={<FaRegTrashAlt />}
Expand All @@ -255,7 +250,6 @@ export default function MoleculePanelHeader({
)}
</>
)}

<Toolbar.Item
title="Float molecule"
icon={<IoOpenOutline />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function PredictionSimpleOptions() {
<div
style={{
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'flex-end',
flex: '1',
height: '100%',
Expand Down

0 comments on commit 31be6ba

Please sign in to comment.