joeyzheng1412-daohq-ticker-react 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joeyzheng1412-daohq-ticker-react",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ import Marquee from "react-fast-marquee";
3
3
  import Dao from "./Dao";
4
4
  import "./Ticker.css";
5
5
 
6
- const Ticker = () => {
6
+ const Ticker = ({ format }) => {
7
7
  const data = [
8
8
  {
9
9
  name: "DAOHQIndex",
@@ -62,21 +62,27 @@ const Ticker = () => {
62
62
  chart: "chart",
63
63
  },
64
64
  ];
65
- return (
66
- <div className="TickerContainer">
67
- <Dao key={data[0].symbol} dao={data[0]} />
68
- <Marquee
69
- speed={20}
70
- pauseOnHover={false}
71
- pauseOnClick
72
- gradient={false}
73
- >
74
- {data.slice(1).map((dao) => {
75
- return <Dao key={dao.symbol} dao={dao} />;
76
- })}
77
- </Marquee>
78
- </div>
79
- );
65
+ if (format === "wide") {
66
+ return (
67
+ <div className="TickerContainer">
68
+ <Dao key={data[0].symbol} dao={data[0]} />
69
+ <Marquee
70
+ speed={20}
71
+ pauseOnHover={false}
72
+ pauseOnClick
73
+ gradient={false}
74
+ >
75
+ {data.slice(1).map((dao) => {
76
+ return <Dao key={dao.symbol} dao={dao} />;
77
+ })}
78
+ </Marquee>
79
+ </div>
80
+ );
81
+ } else if (format === "card") {
82
+ return <div>Card Format Here</div>;
83
+ } else {
84
+ return <div>Invalid format input</div>;
85
+ }
80
86
  };
81
87
 
82
88
  export default Ticker;