[EventPopupBanner] EventPopupBanner, css 추가

This commit is contained in:
jiwon93.son
2024-02-05 18:24:38 +09:00
parent cec6535063
commit 2c05f33453
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
import React, { useCallback, useEffect, useState } from "react";
import $L from "@enact/i18n/$L";
import TPopUp from "../../../components/TPopUp/TPopUp";
import css from "../EventPopUpBanner/EventPopUpBanner.module.less";
export default function EventPopUpBanner({
eventPopInfo,
isEventPopupOpen = true,
}) {
const [eventPopUpOpen, setEventPopUpOpen] = useState(false);
useEffect(() => {
setEventPopUpOpen(isEventPopupOpen);
}, [isEventPopupOpen]);
const handleApply = useCallback(() => {
console.log("handleApply");
}, []);
return (
<TPopUp
kind="eventBannerPopup"
open={eventPopUpOpen}
onClose={() => {
setEventPopUpOpen(false);
}}
onClick={handleApply}
hasButton
button1Text={$L("Apply Now")}
button2Text={$L("Skip")}
className={css.eventBannerPopup}
>
{eventPopInfo && (
<p>
<img src={eventPopInfo.evntImgUrl} alt="eventpopupbanner" />
</p>
)}
</TPopUp>
);
}

View File

@@ -0,0 +1,2 @@
.eventBannerPopup {
}