File tree 5 files changed +12
-34
lines changed
apps/insights/src/components
packages/component-library/src/Card
5 files changed +12
-34
lines changed Original file line number Diff line number Diff line change 1
1
import styles from "./index.module.scss" ;
2
- import { Stats } from "../Stats" ;
3
2
4
3
export const Overview = ( ) => (
5
4
< div className = { styles . overview } >
6
5
< h1 className = { styles . header } > Overview</ h1 >
7
- < Stats />
8
6
</ div >
9
7
) ;
Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ export const PriceFeeds = async () => {
49
49
< div className = { styles . priceFeeds } >
50
50
< h1 className = { styles . header } > Price Feeds</ h1 >
51
51
< div className = { styles . body } >
52
- < Stats />
53
- < section className = { styles . stats } >
52
+ < Stats >
54
53
< StatCard
55
54
variant = "primary"
56
55
header = "Active Feeds"
@@ -76,7 +75,7 @@ export const PriceFeeds = async () => {
76
75
corner = { < Info weight = "fill" /> }
77
76
/>
78
77
</ AssetClassesDrawer >
79
- </ section >
78
+ </ Stats >
80
79
< YesterdaysPricesProvider
81
80
feeds = { Object . fromEntries (
82
81
featuredRecentlyAdded . map ( ( { symbol, product } ) => [
@@ -167,6 +166,7 @@ const FeaturedFeedsCard = <T extends ElementType>({
167
166
} : FeaturedFeedsCardProps < T > ) => (
168
167
< Card { ...props } >
169
168
< div className = { styles . featuredFeeds } >
169
+ < Stats >
170
170
{ feeds . map ( ( feed ) => (
171
171
< Card
172
172
key = { feed . product . price_account }
@@ -193,6 +193,7 @@ const FeaturedFeedsCard = <T extends ElementType>({
193
193
</ div >
194
194
</ Card >
195
195
) ) }
196
+ </ Stats >
196
197
</ div >
197
198
</ Card >
198
199
) ;
Original file line number Diff line number Diff line change 27
27
}
28
28
29
29
.statsContainer {
30
- gap : theme .spacing (6 );
30
+ gap : theme .spacing (2 );
31
31
width : 100% ;
32
32
display : flex ;
33
33
flex-direction : row ;
Original file line number Diff line number Diff line change 1
- import { ArrowLineDown } from "@phosphor-icons/react/dist/ssr/ArrowLineDown"
2
- import { StatCard } from "@pythnetwork/component-library/StatCard"
3
1
4
2
import styles from "./index.module.scss"
5
3
6
- export const Stats = ( ) => {
4
+ export const Stats = ( {
5
+ children
6
+ } : {
7
+ children : React . ReactNode
8
+ } ) => {
7
9
return (
8
10
< div className = { styles . statWrapper } >
9
11
< div className = { styles . statsContainer } >
10
- < StatCard
11
- variant = "primary"
12
- header = "Active Feeds"
13
- stat = { 7 }
14
- href = { '/price-feeds' }
15
- corner = { < ArrowLineDown /> }
16
- />
17
- < StatCard
18
- header = "Active Feeds"
19
- stat = { 7 }
20
- href = { '/price-feeds' }
21
- corner = { < ArrowLineDown /> }
22
- />
23
- < StatCard
24
- header = "Active Feeds"
25
- stat = { 7 }
26
- href = { '/price-feeds' }
27
- corner = { < ArrowLineDown /> }
28
- />
29
- < StatCard
30
- header = "Active Feeds"
31
- stat = { 7 }
32
- href = { '/price-feeds' }
33
- corner = { < ArrowLineDown /> }
34
- />
12
+ { children }
35
13
</ div >
36
14
</ div >
37
15
)
Original file line number Diff line number Diff line change 16
16
position : relative ;
17
17
padding : theme .spacing (1 );
18
18
isolation : isolate ;
19
+ overflow : hidden ;
19
20
20
21
@at-root button #{&} {
21
22
cursor : pointer ;
You can’t perform that action at this time.
0 commit comments