Skip to content

Commit

Permalink
fix: update modal buttons alignments in element dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
tjuanitas committed Jun 21, 2023
1 parent 33c8236 commit c08ce6a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
4 changes: 4 additions & 0 deletions scripts/styleguide.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
&.bce,
&.bcp {
height: 600px;

.bcu {
height: 100%;
}
}

&.bcpr {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ const CreateFolderDialog = ({
<input ref={ref} onKeyDown={onKeyDown} required type="text" />
</label>
<div className="be-modal-btns">
<PrimaryButton data-testid="be-btn-create-folder" isLoading={isLoading} onClick={create} type="button">
<FormattedMessage {...messages.create} />
</PrimaryButton>
<Button
data-testid="be-btn-create-folder-cancel"
isDisabled={isLoading}
Expand All @@ -120,6 +117,9 @@ const CreateFolderDialog = ({
>
<FormattedMessage {...messages.cancel} />
</Button>
<PrimaryButton data-testid="be-btn-create-folder" isLoading={isLoading} onClick={create} type="button">
<FormattedMessage {...messages.create} />
</PrimaryButton>
</div>
</Modal>
);
Expand Down
8 changes: 1 addition & 7 deletions src/elements/common/header/Header.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../variables';

.be .be-header {
.be-header {
display: flex;
flex: 0 0 70px;
align-items: center;
Expand All @@ -16,10 +16,4 @@
flex: 1;
padding-left: 20px;
}

input[type='search'] {
width: 100%;
font: inherit;
-webkit-appearance: none;
}
}
9 changes: 7 additions & 2 deletions src/elements/common/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
.be-modal {
.be-modal-btns {
display: flex;
justify-content: center;
justify-content: flex-end;
padding: 15px 0 0;

.btn {
@include bdl-Button--large;

margin-left: 8px;
margin-top: 0;
margin-bottom: 0;

&:last-of-type {
margin-right: 0;
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/elements/content-explorer/DeleteConfirmationDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ const DeleteConfirmationDialog = ({
>
<FormattedMessage {...message} values={{ name: item.name }} />
<div className="be-modal-btns">
<PrimaryButton isLoading={isLoading} onClick={onDelete} type="button">
<FormattedMessage {...messages.delete} />
</PrimaryButton>
<Button autoFocus isDisabled={isLoading} onClick={onCancel} type="button">
<FormattedMessage {...messages.cancel} />
</Button>
<PrimaryButton isLoading={isLoading} onClick={onDelete} type="button">
<FormattedMessage {...messages.delete} />
</PrimaryButton>
</div>
</Modal>
);
Expand Down
6 changes: 3 additions & 3 deletions src/elements/content-explorer/RenameDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ const RenameDialog = ({
<input ref={ref} defaultValue={nameWithoutExt} onKeyDown={onKeyDown} required type="text" />
</label>
<div className="be-modal-btns">
<PrimaryButton isLoading={isLoading} onClick={rename} type="button">
<FormattedMessage {...messages.rename} />
</PrimaryButton>
<Button isDisabled={isLoading} onClick={onCancel} type="button">
<FormattedMessage {...messages.cancel} />
</Button>
<PrimaryButton isLoading={isLoading} onClick={rename} type="button">
<FormattedMessage {...messages.rename} />
</PrimaryButton>
</div>
</Modal>
);
Expand Down
2 changes: 1 addition & 1 deletion src/styles/common/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ input[type='tel'],
input[type='number'],
div[contentEditable='true'],
textarea {
width: 262px;
width: 100%;

@include box-inputs;
}
Expand Down

0 comments on commit c08ce6a

Please sign in to comment.