Skip to content

Commit

Permalink
Fixed display of back button in adaptivity element
Browse files Browse the repository at this point in the history
  • Loading branch information
mountler committed Dec 9, 2024
1 parent db20c1f commit 78e22b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import {
} from "../../../../Domain/LearningElementModels/LearningElementModelTypes";
import { useTranslation } from "react-i18next";
import CloseButton from "~ReactComponents/ReactRelated/ReactBaseComponents/CloseButton";
import StyledButton from "~ReactComponents/ReactRelated/ReactBaseComponents/StyledButton";

function getNPCImage(model: LearningElementModel, close: boolean): string {
switch (model) {
Expand Down Expand Up @@ -145,12 +146,12 @@ export default function AdaptivityElementDialogContainer({
<div className="z-20 flex items-center justify-center w-full h-20 gap-2 p-2 pb-3 overflow-hidden text-xl font-bold text-adlerdarkblue lg:roboto-black lg:text-2xl ">
{!(currentTask === null && currentQuestion === null) &&
!showAnswerFeedback && (
<CloseButton
<StyledButton
onClick={controller.back}
className="w-8 h-8 p-1 mr-2 text-xs roboto-black xl:w-10 xl:h-10 lg:w-10 lg:h-10 md:w-10 md:h-10 sm:w-10 sm:h-10"
>
{"\u25C0"}
</CloseButton>
</StyledButton>
)}

{currentTask === null && currentQuestion === null && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ exports[`AdaptivityElementDialogContainer should render 1`] = `
<div
class="z-20 flex items-center justify-center w-full h-20 gap-2 p-2 pb-3 overflow-hidden text-xl font-bold text-adlerdarkblue lg:roboto-black lg:text-2xl "
>
<button
class="justify-center aspect-square flex items-center rounded-lg hover:cursor-pointer hover:border-adlerdarkblue hover:bg-adleryellow lg:text-xl transition ease-in-out duration-75 active:translate-x-[1px] active:translate-y-[1px] active:border-b-2 active:border-r-2 active:border-transparent text-adlerdarkblue font-regular border-b-2 border-r-2 border-adlerdarkblue overflow-hidden box-border cursor-pointer bg-buttonbgblue w-8 h-8 p-1 mr-2 text-xs roboto-black xl:w-10 xl:h-10 lg:w-10 lg:h-10 md:w-10 md:h-10 sm:w-10 sm:h-10"
<div
class=""
>
<img
alt="CloseButton"
class="w-6 h-6"
src="close.svg"
/>
</button>
<button
class="mr-2 roboto-black xl:w-10 xl:h-10 justify-center p-1 lg:w-16 lg:h-16 md:w-14 md:h-14 sm:w-10 sm:h-10 w-10 h-10 aspect-square flex items-center text-sm rounded-lg hover:cursor-pointer lg:text-xl transition ease-in-out duration-75 active:translate-x-[1px] active:translate-y-[1px] active:border-b-2 active:border-r-2 active:border-transparent text-adlerdarkblue font-regular border-b-2 border-r-2 border-adlerdarkblue overflow-hidden box-border cursor-pointer bg-buttonbgblue landscape:hover:bg-adleryellow active:bg-adleryellow"
>
</button>
</div>
<img
alt="LearningImage!"
class="visible h-16 -scale-x-100 lg:invisible lg:h-0"
Expand Down

0 comments on commit 78e22b8

Please sign in to comment.