components] TBody.jsx, props 추가

Detail Notes :

1. props, cbScrollTo 추가
This commit is contained in:
younghoon100.park
2024-02-14 15:33:35 +09:00
parent 2649e78df4
commit fae4d70be4

View File

@@ -1,9 +1,12 @@
import classNames from "classnames";
import React from "react";
import classNames from "classnames";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
import css from "./TBody.module.less";
import { SpotlightIds } from "../../utils/SpotlightIds";
import TScroller from "../TScroller/TScroller";
import css from "./TBody.module.less";
const Container = SpotlightContainerDecorator(
{ enterTo: "last-focused", preserveId: true },
@@ -11,10 +14,11 @@ const Container = SpotlightContainerDecorator(
);
export default function TBody({
cbScrollTo,
children,
className,
spotlightId = SpotlightIds.TBODY,
scrollable = true,
spotlightId = SpotlightIds.TBODY,
...rest
}) {
return (
@@ -24,7 +28,9 @@ export default function TBody({
className={classNames(css.tBody, className)}
>
{scrollable ? (
<TScroller className={css.tScroller}>{children}</TScroller>
<TScroller className={css.tScroller} cbScrollTo={cbScrollTo}>
{children}
</TScroller>
) : (
{ children }
)}