TBody, SpotlightIds 추가
This commit is contained in:
27
com.twin.app.shoptime/src/components/TBody/TBody.jsx
Normal file
27
com.twin.app.shoptime/src/components/TBody/TBody.jsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
||||
import css from "./TBody.module.less";
|
||||
import { SpotlightIds } from "../../utils/SpotlightIds";
|
||||
|
||||
const Container = SpotlightContainerDecorator(
|
||||
{ enterTo: "last-focused", preserveId: true },
|
||||
"div"
|
||||
);
|
||||
|
||||
export default function TBody({
|
||||
children,
|
||||
className,
|
||||
spotlightId = SpotlightIds.TBODY,
|
||||
...rest
|
||||
}) {
|
||||
return (
|
||||
<Container
|
||||
spotlightId={spotlightId}
|
||||
{...rest}
|
||||
className={classNames(css.tBody, className)}
|
||||
>
|
||||
{children}
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
6
com.twin.app.shoptime/src/components/TBody/package.json
Normal file
6
com.twin.app.shoptime/src/components/TBody/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"main": "TBody.jsx",
|
||||
"styles": [
|
||||
"TBody.module.less"
|
||||
]
|
||||
}
|
||||
3
com.twin.app.shoptime/src/utils/SpotlightIds.js
Normal file
3
com.twin.app.shoptime/src/utils/SpotlightIds.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export const SpotlightIds = {
|
||||
TBODY: "tbody",
|
||||
};
|
||||
Reference in New Issue
Block a user