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

fix: ModelessDialog に渡した className が当たる場所を変更 #4978

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

uknmr
Copy link
Collaborator

@uknmr uknmr commented Oct 3, 2024

関連URL

概要

ModelessDialog の重なり順序を変えたいが、z-index 値が固定で上書けない問題を修正しました。

変更内容

コンポーネントに渡した className をもう一つ外側の要素にあたるように修正しました。

styled-components を使った拡張をしている場合は見直しが必要になる可能性があります。

// ## Before
const HogeModelessDialog = styled(ModelessDialog)`
  display: block; // 1

  > div {
    display: block; // 2
  }

  .smarthr-ui-ModelessDialog-header {
    display: block;  // 3

    > span {
      display: block; // 4
    }
  }
`

// ## After
const HogeModelessDialog = styled(ModelessDialog)`
  // 直下に書いていたものは .smarthr-ui-ModelessDialog に当ててください。
  .smarthr-ui-ModelessDialog {
    display: block; // 1'

    > div {
      display: block; // 2'
    }
  }

  // クラスセレクタなど、直下に書いていないスタイルへの影響はありません。
  .smarthr-ui-ModelessDialog-header {
    display: block;  // 3'

    > span {
      display: block; // 4'
    }
  }
`

確認方法

@uknmr uknmr requested a review from a team as a code owner October 3, 2024 11:46
@uknmr uknmr requested review from s-sasaki-0529 and hiroki0525 and removed request for a team October 3, 2024 11:46
Copy link

pkg-pr-new bot commented Oct 3, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/kufu/smarthr-ui@4978

commit: 212b2d5

@uknmr uknmr force-pushed the fix-ModelessDialog-className branch from 4fb42a5 to 212b2d5 Compare October 4, 2024 08:01
Copy link
Contributor

@s-sasaki-0529 s-sasaki-0529 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍️ 社内リポジトリのコードを検索する限りは、変更の影響を受けるのは無いように見えます。

@uknmr uknmr merged commit cdc7e4e into master Oct 7, 2024
13 checks passed
@uknmr uknmr deleted the fix-ModelessDialog-className branch October 7, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants