This repository was archived by the owner on Sep 20, 2023. It is now read-only.
File tree 2 files changed +85
-0
lines changed 2 files changed +85
-0
lines changed Original file line number Diff line number Diff line change
1
+ import React , { useState } from 'react'
2
+
3
+ const DShopBanner = ( ) => {
4
+ const [ expanded , setExpanded ] = useState ( )
5
+
6
+ const toggleExpand = ( ) => setExpanded ( ! expanded )
7
+
8
+ return (
9
+ < div
10
+ className = { `dshop-banner${ expanded ? ' expanded' : '' } ` }
11
+ onClick = { toggleExpand }
12
+ >
13
+ < div className = "container" >
14
+ < div className = "wrapper" >
15
+ < div className = "title-text" >
16
+ A new version of the Origin Marketplace is coming!
17
+ </ div >
18
+ < div className = "more-text" >
19
+ All feedback and bug fixes will be applied to the next version. We
20
+ recommend Origin Dshop as an alternative for sellers interested in
21
+ decentralized commerce.
22
+ </ div >
23
+ </ div >
24
+ { expanded ? (
25
+ < a
26
+ href = "https://originprotocol.com/dshop"
27
+ className = "btn btn-link"
28
+ target = "_blank"
29
+ rel = "noreferrer noopener"
30
+ >
31
+ Try Dshop
32
+ </ a >
33
+ ) : (
34
+ < div className = "btn btn-link" > Learn more</ div >
35
+ ) }
36
+ </ div >
37
+ </ div >
38
+ )
39
+ }
40
+
41
+ export default DShopBanner
42
+
43
+ require ( 'react-styl' ) ( `
44
+ .dshop-banner
45
+ background-color: var(--dark)
46
+ color: var(--white)
47
+ padding: 0.875rem 0
48
+ font-size: 0.875rem
49
+ cursor: pointer
50
+
51
+ .container
52
+ display: flex
53
+ justify-content: space-between
54
+ align-items: center
55
+
56
+ .btn.btn-link
57
+ margin: 0
58
+ padding: 0
59
+ font-size: 0.875rem
60
+
61
+ .title-text
62
+ font-weight: 700
63
+
64
+ .more-text
65
+ height: 0px
66
+ opacity: 0
67
+ margin: 0
68
+ transition: opacity 0.3s ease, margin 0.3s ease, height 0s linear 0.3s
69
+
70
+ &.expanded .more-text
71
+ margin-top: 0.5rem
72
+ height: auto
73
+ opacity: 1
74
+
75
+ @media (max-width: 767.98px)
76
+ .dshop-banner
77
+ .container
78
+ flex-direction: column
79
+ text-align: center
80
+
81
+ .btn.btn-link
82
+ margin-top: 0.5rem
83
+ ` )
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import { applyConfiguration } from 'utils/marketplaceCreator'
42
42
import Sentry from 'utils/sentry'
43
43
import CurrencyContext from 'constants/CurrencyContext'
44
44
import { setReferralCode } from 'utils/growthTools'
45
+ import DShopBanner from 'components/DShopBanner'
45
46
46
47
class App extends Component {
47
48
state = {
@@ -122,6 +123,7 @@ class App extends Component {
122
123
{ isTestBuild ? (
123
124
< div className = "test-build-badge" > TEST BUILD</ div >
124
125
) : null }
126
+ < DShopBanner />
125
127
{ ! hideNavbar && (
126
128
< Nav
127
129
onShowHelp = { ( ) => window . openZendeskChat ( ) }
You can’t perform that action at this time.
0 commit comments