[Homepanel]subcategory/categorynav TVirtualGridList 변경건.
- 변경및 스타일수정
This commit is contained in:
@@ -1,19 +1,11 @@
|
||||
import React, { useCallback } from "react";
|
||||
|
||||
import { VirtualGridList } from "@enact/sandstone/VirtualList";
|
||||
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
||||
import ri from "@enact/ui/resolution";
|
||||
|
||||
import { scaleH, scaleW } from "../../../../utils/helperMethods";
|
||||
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
|
||||
import CategoryNavItem from "../CategoryNav/CategoryNavItem/CategoryNavItem";
|
||||
import css from "./CategoryNav.module.less";
|
||||
|
||||
const LIST_ITEM_CONF = {
|
||||
ITEM_WIDTH: 210,
|
||||
ITEM_HEIGHT: 210,
|
||||
SAPCING: 30,
|
||||
};
|
||||
|
||||
const Container = SpotlightContainerDecorator(
|
||||
{ leaveFor: { right: "" }, enterTo: "last-focused" },
|
||||
"nav"
|
||||
@@ -43,19 +35,14 @@ export default function CategoryNav({
|
||||
return (
|
||||
<Container className={css.container} {...rest}>
|
||||
{categoryInfos && categoryInfos.length > 0 && (
|
||||
<VirtualGridList
|
||||
className={css.virtualGridList}
|
||||
<TVirtualGridList
|
||||
className={css.tVirtualGridList}
|
||||
dataSize={categoryInfos.length}
|
||||
direction="horizontal"
|
||||
horizontalScrollbar="hidden"
|
||||
itemRenderer={renderItem}
|
||||
itemSize={{
|
||||
minWidth: scaleW(LIST_ITEM_CONF.ITEM_WIDTH),
|
||||
minHeight: scaleH(LIST_ITEM_CONF.ITEM_HEIGHT),
|
||||
}}
|
||||
noScrollByWheel
|
||||
scrollMode="translate"
|
||||
spacing={scaleW(LIST_ITEM_CONF.SAPCING)}
|
||||
itemHeight={209}
|
||||
itemWidth={210}
|
||||
spacing={30}
|
||||
renderItem={renderItem}
|
||||
/>
|
||||
)}
|
||||
</Container>
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
@import "../../../../style/utils.module.less";
|
||||
|
||||
.container {
|
||||
.size(@w: 100%, @h:210px);
|
||||
.size(@w: 100%, @h:208px);
|
||||
z-index: 10;
|
||||
background-color: @BG_COLOR_01;
|
||||
.font(@fontFamily: @baseFontBold, @fontSize: 28px);
|
||||
.tVirtualGridList {
|
||||
height: 209px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user