Skip to content

Commit

Permalink
disc gradient improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleveille committed Jun 9, 2024
1 parent a6f7075 commit 8530417
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/disc/Disc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ export const Disc = ({ disc }: DiscProps) => {
background_color: backgroundColor
} = disc;

const outerGradient = backgroundColor === "#000000" ? "#666666" : "#222222";
const innerGradient = backgroundColor === "#000000" ? "#333333" : backgroundColor;
const outerGradient = "#000000";

const gradient: React.CSSProperties = {
background: `radial-gradient(circle, ${backgroundColor} 45%, ${outerGradient} 90%)`
background: `radial-gradient(circle, ${innerGradient} 50%, ${outerGradient} 100%)`
};

return (
Expand Down
5 changes: 3 additions & 2 deletions src/components/disc/DiscDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ export const DiscDetail = ({ disc }: DiscDetailProps) => {
background_color: backgroundColor
} = disc;

const outerGradient = backgroundColor === "#000000" ? "#444444" : "#000000";
const innerGradient = backgroundColor === "#000000" ? "#222222" : backgroundColor;
const outerGradient = "#000000";

const gradient: React.CSSProperties = {
background: `radial-gradient(circle, ${backgroundColor} 45%, ${outerGradient} 90%)`
background: `radial-gradient(circle, ${innerGradient} 50%, ${outerGradient} 95%)`
};

const isDiscInBag = selectedBag?.discs.includes(id) ?? false;
Expand Down
3 changes: 2 additions & 1 deletion src/components/disc/DiscGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const DiscGrid = () => {
disabled: !hasMoreDiscsToRender,
onLoadMore: renderMoreDiscs,
rootMargin: "0px 0px 16px 0px",
delayInMs: 50
delayInMs: 10
});

if (isBagView && !selectedBag) {
Expand Down Expand Up @@ -104,6 +104,7 @@ export const DiscGrid = () => {
horizontal: "left"
}}
sx={{ marginTop: "0.5rem" }}
disableScrollLock
>
<BagList onClose={handleBagListClose} />
</Popover>
Expand Down

0 comments on commit 8530417

Please sign in to comment.