-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Uptime] Update ML flyout to add cancel button #61627
Changes from 1 commit
acc162e
80834f5
772bf45
d3dd928
35466df
c9c2d54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
import React, { useContext } from 'react'; | ||
import { | ||
EuiButton, | ||
EuiButtonEmpty, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiFlyout, | ||
|
@@ -64,11 +65,20 @@ export function MLFlyoutView({ isCreatingJob, onClickCreate, onClose, canCreateM | |
<em>{labels.TAKE_SOME_TIME_TEXT}</em> | ||
</p> | ||
</EuiText> | ||
|
||
<EuiSpacer /> | ||
</EuiFlyoutBody> | ||
<EuiFlyoutFooter> | ||
<EuiFlexGroup justifyContent="spaceBetween" alignItems="flexEnd"> | ||
<EuiFlexItem grow={true}> | ||
<EuiButtonEmpty | ||
style={{ width: 100 }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure - why do we need to set the width? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was taking half width and hence was pusing cancel button to center, i think maybe i could have achieved this by using justifyContent to flexStart There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let me check an EUI example to achieve this best using EUI |
||
fullWidth={false} | ||
onClick={() => onClose()} | ||
disabled={isCreatingJob || isLoadingMLJob} | ||
> | ||
{labels.CANCEL_LABEL} | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
onClick={() => onClickCreate()} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if i set this to false, create new button will take all the space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need to remove alignItems="flexEnd"