Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/components/Footer/__snapshots__/Footer.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`Footer to match snapshot 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 shifter | A Product by
©2024 shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
9 changes: 6 additions & 3 deletions src/components/Modals/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type ModalProps = PropsWithChildren<{
style?: CSSProperties;
noPadding?: boolean;
targetElement?: Element;
backdropDismiss?: boolean; // モーダルの背景をクリックして閉じるかどうか
}>;

export const ModalRow: FC<
Expand All @@ -39,6 +40,7 @@ export const ModalRow: FC<
onSubmit,
style,
noPadding = false,
backdropDismiss,
}) => {
const { open, isOpen: isOpenHandler, dismiss } = useModal();

Expand All @@ -64,7 +66,7 @@ export const ModalRow: FC<
aria-labelledby="modal-label"
aria-hidden="false"
aria-modal="true"
onClick={() => isOpenHandler(false)}
onClick={() => backdropDismiss && isOpenHandler(false)}
style={style}
>
<div
Expand Down Expand Up @@ -97,6 +99,7 @@ export const Modal: FC<ModalProps> = ({
dismiss = false,
setOpen,
targetElement,
backdropDismiss = true, // デフォルト値をtrueに設定
...props
}) => {
const [_isOpen, _setIsOpen] = useState(open || false);
Expand All @@ -122,7 +125,7 @@ export const Modal: FC<ModalProps> = ({
dismiss,
}}
>
<ModalRow {...props} />
<ModalRow {...props} backdropDismiss={backdropDismiss} />
</ModalContext.Provider>,
targetElement
);
Expand All @@ -136,7 +139,7 @@ export const Modal: FC<ModalProps> = ({
dismiss,
}}
>
<ModalRow {...props} />
<ModalRow {...props} backdropDismiss={backdropDismiss} />
</ModalContext.Provider>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ exports[`Nav to match snapshot [OneColumns] 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
2 changes: 1 addition & 1 deletion stories/pages/admin/__snapshots__/Guides.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ exports[`Guides to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
2 changes: 1 addition & 1 deletion stories/pages/admin/__snapshots__/ListSites.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ exports[`ListSites to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ exports[`SiteSettings to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ exports[`ForgetPassword to match snapshot (failure) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -321,7 +321,7 @@ exports[`ForgetPassword to match snapshot (inprogress) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -491,7 +491,7 @@ exports[`ForgetPassword to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
6 changes: 3 additions & 3 deletions stories/pages/public/__snapshots__/Login.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ exports[`Login to match snapshot (failure) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -581,7 +581,7 @@ exports[`Login to match snapshot (inprogress) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -859,7 +859,7 @@ exports[`Login to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
6 changes: 3 additions & 3 deletions stories/pages/public/__snapshots__/LoginMFA.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ exports[`LoginMFA to match snapshot (failure) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -420,7 +420,7 @@ exports[`LoginMFA to match snapshot (inprogress) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -617,7 +617,7 @@ exports[`LoginMFA to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
4 changes: 2 additions & 2 deletions stories/pages/public/__snapshots__/SignUp.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ exports[`SignUp to match snapshot (failure) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -523,7 +523,7 @@ exports[`SignUp to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ exports[`SignUpVerification to match snapshot (failure) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down Expand Up @@ -360,7 +360,7 @@ exports[`SignUpVerification to match snapshot(default) 1`] = `
<small
class="d-flex align-items-center justify-content-center"
>
©2023 Shifter | A Product by
©2024 Shifter | A Product by
<a
href="https://www.digitalcube.jp/"
rel="nofollow noopener"
Expand Down
Loading