Skip to content

Commit

Permalink
fix: Dialog 背景に z-index を追加 (#4910)
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr authored Sep 11, 2024
1 parent e5976a0 commit 1039225
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const Action_Dialog: StoryFn = () => {
aria-haspopup="dialog"
aria-controls="dialog-action"
data-test="dialog-trigger"
// 別のスタッキングコンテキストがダイアログ背景よりも上に来ないことを確認するための記述
style={{ position: 'relative', zIndex: 21 }}
>
ActionDialog
</Button>
Expand Down
4 changes: 4 additions & 0 deletions packages/smarthr-ui/src/components/Dialog/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export const Default: StoryFn = () => {
aria-haspopup="dialog"
aria-controls="dialog-default"
data-test="dialog-trigger"
// 別のスタッキングコンテキストがダイアログ背景よりも上に来ないことを確認するための記述
style={{ zIndex: 21, position: 'relative' }}
>
Dialog
</Button>
Expand Down Expand Up @@ -188,6 +190,8 @@ export const Form_Dialog: StoryFn = () => {
aria-haspopup="dialog"
aria-controls="dialog-form"
data-test="dialog-trigger"
// 別のスタッキングコンテキストがダイアログ背景よりも上に来ないことを確認するための記述
style={{ position: 'relative', zIndex: 21 }}
>
FormDialog
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Props = PropsWithChildren<

const dialogOverlap = tv({
base: [
'shr-absolute shr-inset-0',
'shr-absolute shr-inset-0 shr-z-overlap-base',
'[&.shr-dialog-transition-enter]:shr-opacity-0',
'[&.shr-dialog-transition-enter-active]:shr-transition-opacity',
'[&.shr-dialog-transition-enter-active]:shr-duration-300',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export const Message_Dialog: StoryFn = () => {
aria-haspopup="dialog"
aria-controls="dialog-message"
data-test="dialog-trigger"
// 別のスタッキングコンテキストがダイアログ背景よりも上に来ないことを確認するための記述
style={{ position: 'relative', zIndex: 21 }}
>
MessageDialog
</Button>
Expand Down

0 comments on commit 1039225

Please sign in to comment.