Skip to content

Commit

Permalink
Merge pull request smaranjitghose#1041 from ashuvssut/media-manip-bug
Browse files Browse the repository at this point in the history
Media manip bug - image looks squuezed
  • Loading branch information
smaranjitghose authored Jun 1, 2021
2 parents 43ce3df + ce68913 commit 255f210
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 60 deletions.
21 changes: 13 additions & 8 deletions src/pages/MediaManip/Button/Button.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import React from "react";
import styles from "./button.module.scss";
import { Button as MuiButton } from "@material-ui/core";

function Button({ value, type, disabled, onClick }) {
function Button({ value, disabled, onClick }) {
return (
<button
className={`${styles.btn} ${styles[type]}`}
disabled={disabled}
onClick={onClick}
>
{value}
</button>
<div className={styles.btnWrap}>
<MuiButton
variant="contained"
color="primary"
component="span"
onClick={onClick}
disabled={disabled}
>
{value}
</MuiButton>
</div>
);
}

Expand Down
45 changes: 1 addition & 44 deletions src/pages/MediaManip/Button/button.module.scss
Original file line number Diff line number Diff line change
@@ -1,46 +1,3 @@
.btn {
.btnWrap {
padding: 15px;
border: 3px solid transparent;
border-radius: 6px;
font-weight: bold;
font-size: 14px;
text-transform: uppercase;
margin-left: 10px;
box-shadow: 2px 4px 5px #0000005b;

&:disabled {
cursor: not-allowed;
background-color: #cccccc;
color: #beb8b8;
border: 3px solid transparent;

&:hover {
background-color: #cccccc;
border: 3px solid transparent;
color: #b1afaf;
}
}
}

.primary {
background: #add8e6;
color: black;

&:hover {
background: #5597c0a6;
color: rgba(0, 0, 0, 0.651);
border: 3px solid #4e89ae;
}
}

.secondary {
background: #4e89ae;
border: 3px solid #4e89ae;
color: white;

&:hover {
background: #5597c0a6;
color: rgba(0, 0, 0, 0.651);
border: 3px solid #4e89ae;
}
}
11 changes: 6 additions & 5 deletions src/pages/MediaManip/DragDrop/drag-drop.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
position: relative;

& > img {
display: "block";
object-fit: cover;
object-position: center center;
display: block;
width: 150px;
height: 150px;
border-radius: 10px;
margin-right: 10px;
object-fit: fill;
box-shadow: 0.8px 2px 6px rgba(36, 34, 34, 0.507);
}

Expand All @@ -56,19 +57,19 @@
}
}

.scroll::-webkit-scrollbar-track {
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
background-color: #f5f5f5;
}

.scroll::-webkit-scrollbar {
::-webkit-scrollbar {
width: 12px;
background-color: #f5f5f5;
}

.scroll::-webkit-scrollbar-thumb {
::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
Expand Down
6 changes: 3 additions & 3 deletions src/pages/MediaManip/MediaManip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PDFDocument } from "pdf-lib";
import Progress from "./Progress/Progress";
import Dropdown from "./DropDown/DropDown";
import DragDrop from "./DragDrop/DragDrop";
import Button from "./Button/Button";
import MuiButton from "./Button/Button";

import styles from "./media-manip.module.scss";

Expand Down Expand Up @@ -196,14 +196,14 @@ export default function MediaManip() {
setOutputOptions={setOutputOptions}
/>
<div className={styles.mediaManip_btn}>
<Button
<MuiButton
value="Convert"
type="primary"
onClick={() => onConvert()}
disabled={convert}
/>
{!convert && (
<Button
<MuiButton
value="Download"
type="secondary"
onClick={onDownload}
Expand Down

0 comments on commit 255f210

Please sign in to comment.