You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
import React from "react"; |
|
import Carousel from "./carousel"; |
|
import Component2D from "./2d"; |
|
import Component3D from "./3d"; |
|
import FlexAround from "./flexAround"; |
|
import BackgroundTile from "./backgroundTile"; |
|
import Shop from "./shop.js"; |
|
|
|
const Identifier = (item) => { |
|
let component; |
|
switch (item.name) { |
|
case "carousel": |
|
component = <Carousel navigation={item.navigation} list={item.list} />; |
|
break; |
|
case "2d": |
|
component = ( |
|
<Component2D navigation={item.navigation} list={item.items} flexDirection={item.flexDirection} /> |
|
); |
|
break; |
|
case "3d": |
|
component = <Component3D navigation={item.navigation} list={item.items} />; |
|
break; |
|
case "flex-around": |
|
component = <FlexAround navigation={item.navigation} item={item} />; |
|
break; |
|
case "background-tile": |
|
component = <BackgroundTile navigation={item.navigation} item={item} />; |
|
break; |
|
case "shop": |
|
component = <Shop navigation={item.navigation} item={item} />; |
|
break; |
|
default: |
|
component = null; |
|
} |
|
return <>{component}</>; |
|
}; |
|
|
|
export default Identifier;
|
|
|