Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
erquhart committed Nov 3, 2017
1 parent f930370 commit 431bfd2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 123 deletions.
39 changes: 3 additions & 36 deletions src/components/MediaLibrary/MediaLibrary.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import './MediaLibraryFooter.css';

:root {
--mediaLibraryCardWidth: 300px;
--mediaLibraryCardMargin: 10px;
Expand Down Expand Up @@ -33,31 +35,6 @@
margin-top: 20px;
}

.nc-mediaLibrary-buttonRight {
float: right;
margin-left: 10px;
}

.nc-mediaLibrary-buttonLeft {
float: left;
margin-right: 10px;
}

.nc-mediaLibrary-button-loader {
float: left;
margin: 8px 20px;
}

.nc-mediaLibrary-button-loaderSpinner {
position: static;
}

.nc-mediaLibrary-button-loaderText {
position: relative;
top: 2px;
margin-left: 18px;
}

.nc-mediaLibrary-searchInput {
@apply --input;
font-family: var(--fontFamilyPrimary);
Expand All @@ -69,14 +46,6 @@
z-index: 1;
}

.nc-mediaLibrary-thumbnail {
max-height: 44px;
max-width: 88px;
margin: -10px auto;
display: block;
border-radius: 4px;
}

.nc-mediaLibrary-emptyMessage {
height: 100%;
width: 100%;
Expand All @@ -88,9 +57,6 @@
align-items: center;
}

.nc-mediaLibrary-paginatingMessage {
}

.nc-mediaLibrary-cardGrid-container {
height: calc(100% - 150px);
margin: 20px auto 0;
Expand All @@ -109,6 +75,7 @@
border: var(--textFieldBorder);
border-radius: var(--borderRadius);
cursor: pointer;
overflow: hidden;
}

.nc-mediaLibrary-card-selected {
Expand Down
25 changes: 25 additions & 0 deletions src/components/MediaLibrary/MediaLibraryFooter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.nc-mediaLibrary-footer-buttonRight {
float: right;
margin-left: 10px;
}

.nc-mediaLibrary-footer-buttonLeft {
float: left;
margin-right: 10px;
}

.nc-mediaLibrary-footer-button-loader {
float: left;
margin: 8px 20px;
}

.nc-mediaLibrary-footer-button-loaderSpinner {
position: static;
}

.nc-mediaLibrary-footer-button-loaderText {
position: relative;
top: 2px;
margin-left: 18px;
}

14 changes: 7 additions & 7 deletions src/components/MediaLibrary/MediaLibraryFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ const MediaLibraryFooter = ({
const shouldShowLoader = isPersisting || isDeleting;
const loaderText = isPersisting ? 'Uploading...' : 'Deleting...';
const loader = (
<div className="nc-mediaLibrary-button-loader">
<Loader className="nc-mediaLibrary-button-loaderSpinner" active/>
<strong className="nc-mediaLibrary-button-loaderText">{loaderText}</strong>
<div className="nc-mediaLibrary-footer-button-loader">
<Loader className="nc-mediaLibrary-footer-button-loaderSpinner" active/>
<strong className="nc-mediaLibrary-footer-button-loaderText">{loaderText}</strong>
</div>
);
return (
<div>
<Button
label="Delete"
onClick={onDelete}
className="nc-mediaLibrary-buttonLeft"
className="nc-mediaLibrary-footer-buttonLeft"
disabled={shouldShowLoader || !hasSelection}
accent
raised
Expand All @@ -35,7 +35,7 @@ const MediaLibraryFooter = ({
label="Upload"
accept={forImage}
onChange={onPersist}
className="nc-mediaLibrary-buttonLeft"
className="nc-mediaLibrary-footer-buttonLeft"
disabled={shouldShowLoader}
primary
raised
Expand All @@ -44,14 +44,14 @@ const MediaLibraryFooter = ({
<Button
label="Close"
onClick={onClose}
className="nc-mediaLibrary-buttonRight"
className="nc-mediaLibrary-footer-buttonRight"
raised
/>
{ !canInsert ? null :
<Button
label="Insert"
onClick={onInsert}
className="nc-mediaLibrary-buttonRight"
className="nc-mediaLibrary-footer-buttonRight"
disabled={!hasSelection}
primary
raised
Expand Down
80 changes: 0 additions & 80 deletions src/components/MediaLibrary/MediaLibraryTable.js

This file was deleted.

0 comments on commit 431bfd2

Please sign in to comment.