Skip to content

Commit

Permalink
fix(modal): styles with sass upgrade (#10237)
Browse files Browse the repository at this point in the history
* fix(modal): styles with sass upgrade

* fix(modal): add transition styles

* fix(modal): remove modal trigger button from story

---------

Co-authored-by: Anna Wen <[email protected]>
  • Loading branch information
ariellalgilmore and annawen1 authored Mar 21, 2023
1 parent be7cc78 commit 46993a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.

This file was deleted.

13 changes: 3 additions & 10 deletions packages/carbon-web-components/src/components/modal/modal-story.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2019, 2022
* Copyright IBM Corp. 2019, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand All @@ -20,7 +20,6 @@ import './modal-label';
import './modal-body';
import './modal-footer';
import './modal-footer-button';
import styles from './modal-story.scss';
import storyDocs from './modal-story.mdx';

const sizes = {
Expand All @@ -39,6 +38,7 @@ export const Default = (args) => {
event.preventDefault();
}
};

return html`
<bx-modal
?open="${open}"
Expand Down Expand Up @@ -129,14 +129,7 @@ ThreeButtons.storyName = 'Three buttons';

export default {
title: 'Components/Modal',
decorators: [
(story) => html`
<style type="text/css">
${styles.cssText}
</style>
${story()}
`,
],
decorators: [(story) => html` ${story()} `],
parameters: {
...storyDocs.parameters,
knobs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@

:host(#{$prefix}-modal[open]) {
@extend .#{$prefix}--modal, .is-visible;

opacity: 1;
transition: visibility 0ms linear,
opacity $duration--moderate-02 motion(entrance, expressive);
visibility: inherit;

@media screen and (prefers-reduced-motion: reduce) {
transition: none;
}
}

:host(#{$prefix}-modal-header) {
Expand Down

0 comments on commit 46993a9

Please sign in to comment.