Collection Add Sketch and Share buttons
This commit is contained in:
parent
fc02f49d93
commit
bcebc070a6
4 changed files with 68 additions and 18 deletions
|
@ -36,7 +36,7 @@ const ShareURL = ({ value }) => {
|
||||||
<br />
|
<br />
|
||||||
<CopyableInput value={value} />
|
<CopyableInput value={value} />
|
||||||
</React.Fragment> :
|
</React.Fragment> :
|
||||||
<button onClick={() => setShowURL(true)}>Share collection</button>
|
<button className="collection-share__button" onClick={() => setShowURL(true)}>Share collection</button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -352,7 +352,7 @@ class Collection extends React.Component {
|
||||||
}
|
}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p className="collection-metadata__user">{items.length} sketch{items.length === 1 ? '' : 'es'} collected by {owner.username}</p>
|
<p className="collection-metadata__user">By {owner.username}</p>
|
||||||
|
|
||||||
<p className="collection-metadata__description">
|
<p className="collection-metadata__description">
|
||||||
{
|
{
|
||||||
|
@ -365,12 +365,20 @@ class Collection extends React.Component {
|
||||||
description
|
description
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p className="collection-metadata__user">{items.length} sketch{items.length === 1 ? '' : 'es'}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="collection-metadata__column--right">
|
<div className="collection-metadata__column--right">
|
||||||
<p className="collection-metadata__share">
|
<p className="collection-metadata__share">
|
||||||
<ShareURL value={`${baseURL}${id}`} />
|
<ShareURL value={`${baseURL}${id}`} />
|
||||||
</p>
|
</p>
|
||||||
|
{
|
||||||
|
this.isOwner() &&
|
||||||
|
<button className="collection-metadata__add-button" onClick={this.showAddSketches}>
|
||||||
|
Add more sketches
|
||||||
|
</button>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -450,15 +458,6 @@ class Collection extends React.Component {
|
||||||
/>))}
|
/>))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{
|
|
||||||
this.isOwner() &&
|
|
||||||
<p className="collection-add-button">
|
|
||||||
<button onClick={this.showAddSketches}>
|
|
||||||
Add more sketches
|
|
||||||
</button>
|
|
||||||
</p>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,6 +102,33 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%primary-button {
|
||||||
|
@include themify() {
|
||||||
|
background-color: getThemifyVariable('primary-button-background-color');
|
||||||
|
color: getThemifyVariable('primary-button-color');
|
||||||
|
cursor: pointer;
|
||||||
|
border: 2px solid getThemifyVariable('primary-button-border-color');
|
||||||
|
border-radius: 2px;
|
||||||
|
padding: #{10 / $base-font-size}rem #{30 / $base-font-size}rem;
|
||||||
|
&:enabled:hover {
|
||||||
|
border-color: getThemifyVariable('primary-button-background-hover-color');
|
||||||
|
background-color: getThemifyVariable('primary-button-background-hover-color');
|
||||||
|
color: getThemifyVariable('primary-button-hover-color');
|
||||||
|
& g {
|
||||||
|
fill: getThemifyVariable('primary-button-hover-color');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:enabled:active {
|
||||||
|
border-color: getThemifyVariable('primary-button-background-active-color');
|
||||||
|
background-color: getThemifyVariable('primary-button-background-active-color');
|
||||||
|
color: getThemifyVariable('primary-button-active-color');
|
||||||
|
& g {
|
||||||
|
fill: getThemifyVariable('primary-button-active-color');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
%preferences-button {
|
%preferences-button {
|
||||||
@extend %toolbar-button;
|
@extend %toolbar-button;
|
||||||
@include themify() {
|
@include themify() {
|
||||||
|
|
|
@ -76,6 +76,9 @@ $themes: (
|
||||||
codefold-icon-open: url(../images/triangle-arrow-down.svg),
|
codefold-icon-open: url(../images/triangle-arrow-down.svg),
|
||||||
codefold-icon-closed: url(../images/triangle-arrow-right.svg),
|
codefold-icon-closed: url(../images/triangle-arrow-right.svg),
|
||||||
|
|
||||||
|
primary-button-color: #fff,
|
||||||
|
primary-button-background-color: $p5js-pink,
|
||||||
|
|
||||||
form-title-color: rgba(51, 51, 51, 0.87),
|
form-title-color: rgba(51, 51, 51, 0.87),
|
||||||
form-secondary-title-color: $middleGray,
|
form-secondary-title-color: $middleGray,
|
||||||
form-input-text-color: $dark,
|
form-input-text-color: $dark,
|
||||||
|
@ -141,6 +144,10 @@ $themes: (
|
||||||
table-row-stripe-color: #3f3f3f,
|
table-row-stripe-color: #3f3f3f,
|
||||||
codefold-icon-open: url(../images/triangle-arrow-down-white.svg),
|
codefold-icon-open: url(../images/triangle-arrow-down-white.svg),
|
||||||
codefold-icon-closed: url(../images/triangle-arrow-right-white.svg),
|
codefold-icon-closed: url(../images/triangle-arrow-right-white.svg),
|
||||||
|
|
||||||
|
primary-button-color: #fff,
|
||||||
|
primary-button-background-color: $p5js-pink,
|
||||||
|
|
||||||
form-title-color: $white,
|
form-title-color: $white,
|
||||||
form-secondary-title-color: #b5b5b5,
|
form-secondary-title-color: #b5b5b5,
|
||||||
form-border-color: #b5b5b5,
|
form-border-color: #b5b5b5,
|
||||||
|
@ -203,6 +210,10 @@ $themes: (
|
||||||
table-row-stripe-color: #3f3f3f,
|
table-row-stripe-color: #3f3f3f,
|
||||||
codefold-icon-open: url(../images/triangle-arrow-down-white.svg),
|
codefold-icon-open: url(../images/triangle-arrow-down-white.svg),
|
||||||
codefold-icon-closed: url(../images/triangle-arrow-right-white.svg),
|
codefold-icon-closed: url(../images/triangle-arrow-right-white.svg),
|
||||||
|
|
||||||
|
primary-button-color: #fff,
|
||||||
|
primary-button-background-color: $p5js-pink,
|
||||||
|
|
||||||
form-title-color: $white,
|
form-title-color: $white,
|
||||||
form-secondary-title-color: #b5b5b5,
|
form-secondary-title-color: #b5b5b5,
|
||||||
form-border-color: #b5b5b5,
|
form-border-color: #b5b5b5,
|
||||||
|
|
|
@ -23,6 +23,14 @@
|
||||||
|
|
||||||
.collection-metadata__column--right {
|
.collection-metadata__column--right {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-metadata__column--right > * {
|
||||||
|
margin-top: #{10 / $base-font-size}rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.collection-metadata__name {
|
.collection-metadata__name {
|
||||||
|
@ -44,13 +52,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.collection-metadata__user {
|
.collection-metadata__user {
|
||||||
padding-top: #{12 / $base-font-size}rem;
|
padding-top: #{8 / $base-font-size}rem;
|
||||||
padding-left: #{8 / $base-font-size}rem;
|
padding-left: #{8 / $base-font-size}rem;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.collection-metadata__description {
|
.collection-metadata__description {
|
||||||
padding-top: #{24 / $base-font-size}rem;
|
padding-top: #{8 / $base-font-size}rem;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@ -76,13 +84,13 @@
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
.collection-add-button {
|
|
||||||
padding: #{24 / $base-font-size}rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collection-share {
|
.collection-share {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
// padding: #{10 / $base-font-size}rem #{30 / $base-font-size}rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-share__button {
|
||||||
|
@extend %button;
|
||||||
}
|
}
|
||||||
|
|
||||||
.collection-share__label {
|
.collection-share__label {
|
||||||
|
@ -93,3 +101,8 @@
|
||||||
.collection-share .copyable-input {
|
.collection-share .copyable-input {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collection-metadata__add-button {
|
||||||
|
@extend %primary-button;
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue