Skip to content

Commit

Permalink
feat: rainbow bg on progress
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Dec 22, 2022
1 parent 86864da commit e0dbfa8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ProgressBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const ProgressBar: React.FC<Props> = ({ progress }) => {
return (
<div className="relative h-1 w-full rounded-lg bg-neutral-100 dark:bg-neutral-800">
<div
className="absolute left-0 h-full rounded-lg bg-orange-600 transition-all duration-150"
className="rainbow-background absolute left-0 h-full rounded-lg bg-orange-600 transition-all duration-150"
style={{ width: progress * 100 + '%' }}
></div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ root.render(
}
return { address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045' };
},
rainbowRoad: true,
// networkCode: 'goerli',
theme: 'dark',
});
Expand Down
16 changes: 16 additions & 0 deletions src/styles/scrollbars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@
rgba(251, 7, 217, 1) 90%,
rgba(255, 0, 0, 1) 100%
);
.rainbow-background {
background: linear-gradient(
90deg,
rgba(255, 0, 0, 1) 0%,
rgba(255, 154, 0, 1) 10%,
rgba(208, 222, 33, 1) 20%,
rgba(79, 220, 74, 1) 30%,
rgba(63, 218, 216, 1) 40%,
rgba(47, 201, 226, 1) 50%,
rgba(28, 127, 238, 1) 60%,
rgba(95, 21, 242, 1) 70%,
rgba(186, 12, 248, 1) 80%,
rgba(251, 7, 217, 1) 90%,
rgba(255, 0, 0, 1) 100%
);
}
--scrollbar-color: transparent;
.layout-scrollbar {
overflow-y: overlay;
Expand Down

0 comments on commit e0dbfa8

Please sign in to comment.