Skip to content

Commit 001a30f

Browse files
committed
potentional option for collection sharing
1 parent 5319bbb commit 001a30f

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

client/modules/User/components/Collection.jsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import Overlay from '../../App/components/Overlay';
2020
import SketchList from '../../IDE/components/AddToCollectionSketchList';
2121
import CopyableInput from '../../IDE/components/CopyableInput';
2222
import { SketchSearchbar } from '../../IDE/components/Searchbar';
23+
import dropdownArrow from '../../../images/down-arrow.svg';
2324

2425
const arrowUp = require('../../../images/sort-arrow-up.svg');
2526
const arrowDown = require('../../../images/sort-arrow-down.svg');
@@ -30,14 +31,14 @@ const ShareURL = ({ value }) => {
3031

3132
return (
3233
<div className="collection-share">
33-
{
34-
showURL ?
35-
<React.Fragment>
36-
<span className="collection-share__label">Everyone can access the collection with this link</span>
37-
<br />
38-
<CopyableInput value={value} />
39-
</React.Fragment> :
40-
<button className="collection-share__button" onClick={() => setShowURL(true)}>Share</button>
34+
<button className="collection-share__button" onClick={() => setShowURL(!showURL)}>
35+
<span>Share</span>
36+
<InlineSVG className="collection-share__arrow" src={dropdownArrow} />
37+
</button>
38+
{ showURL &&
39+
<div className="collection__share-dropdown">
40+
<CopyableInput value={value} label="Link to Collection" />
41+
</div>
4142
}
4243
</div>
4344
);

client/styles/abstracts/_placeholders.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
border: 2px solid getThemifyVariable('button-border-color');
8484
border-radius: 2px;
8585
padding: #{10 / $base-font-size}rem #{30 / $base-font-size}rem;
86+
& g {
87+
fill: getThemifyVariable('button-color');
88+
opacity: 1;
89+
}
8690
&:enabled:hover {
8791
border-color: getThemifyVariable('button-background-hover-color');
8892
background-color: getThemifyVariable('button-background-hover-color');

client/styles/components/_collection.scss

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,29 @@
8484

8585
.collection-share {
8686
text-align: right;
87+
position: relative;
8788
}
8889

8990
.collection-share__button {
9091
@extend %button;
92+
display: flex;
93+
align-items: center;
9194
}
9295

93-
.collection-share__label {
94-
display: block;
95-
text-align: left;
96+
.collection-share__arrow {
97+
margin-left: #{5 / $base-font-size}rem;
9698
}
9799

98100
.collection-share .copyable-input {
99101
padding-bottom: 0;
100102
}
101103

104+
.collection__share-dropdown {
105+
@extend %dropdown-open-right;
106+
padding: #{20 / $base-font-size}rem;
107+
width: #{350 / $base-font-size}rem;
108+
}
109+
102110
.collection-metadata__add-button {
103111
@extend %button;
104112
flex-grow: 0;

0 commit comments

Comments
 (0)