[mypage]reminders관련작업
- mypage/reminder 작성 - TSwitch작성 - Theader 삭제버튼시에 추가.
This commit is contained in:
@@ -5,6 +5,9 @@ import classNames from "classnames";
|
||||
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
||||
import Spottable from "@enact/spotlight/Spottable";
|
||||
|
||||
import { $L } from "../../utils/helperMethods";
|
||||
import TButton, { SIZES, TYPES } from "../TButton/TButton";
|
||||
import TSwitch from "../TSwitch/TSwitch";
|
||||
import css from "./THeader.module.less";
|
||||
|
||||
const Container = SpotlightContainerDecorator(
|
||||
@@ -12,13 +15,31 @@ const Container = SpotlightContainerDecorator(
|
||||
"div"
|
||||
);
|
||||
const SpottableComponent = Spottable("button");
|
||||
export default function THeader({ title, className, onBackButton, onClick }) {
|
||||
export default function THeader({
|
||||
title,
|
||||
className,
|
||||
onBackButton,
|
||||
onDeleteButton,
|
||||
onClick,
|
||||
}) {
|
||||
return (
|
||||
<Container className={classNames(css.tHeader, className)}>
|
||||
{onBackButton && (
|
||||
<SpottableComponent className={css.button} onClick={onClick} />
|
||||
)}
|
||||
<div className={css.title}>{title}</div>
|
||||
{title === "Reminders" && onDeleteButton && (
|
||||
<>
|
||||
<TSwitch selected={true} />
|
||||
<TButton
|
||||
type={TYPES.mypage}
|
||||
className={css.deleteBtn}
|
||||
size={SIZES.small}
|
||||
>
|
||||
{$L("Delete")}
|
||||
</TButton>
|
||||
</>
|
||||
)}
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user