Skip to content
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

feat(modal): stack modal buttons in small viewports #6609

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
width: 100%;
// 196px from design kit
max-width: rem(196px);
border-right: $button-separator;
}

.#{$prefix}--btn--secondary.#{$prefix}--btn--disabled
Expand Down
15 changes: 15 additions & 0 deletions packages/components/src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -295,20 +295,35 @@

.#{$prefix}--modal-footer {
display: flex;
flex-direction: column;

grid-row: -1/-1;
grid-column: 1/-1;
justify-content: flex-end;
height: 4rem;
margin-top: auto;

@include carbon--breakpoint(md) {
flex-direction: row;
}

button.#{$prefix}--btn {
flex: 0 1 50%;
max-width: none;
height: 4rem;
margin: 0;
padding-top: $spacing-05;
padding-bottom: $spacing-07;
border-bottom: $button-separator;

@include carbon--breakpoint(md) {
border-right: $button-separator;
border-bottom: 0;
}

&:last-of-type {
border: 0;
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/globals/scss/_theme-tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ $button-outline-offset: -5px !default;
/// @deprecated
$button-outline: 1px solid $ibm-color__white-0 !default;

/// @type Value
/// @access public
/// @group button
$button-separator: 1px solid $gray-20;

// Accordion

/// @type Value
Expand Down