Skip to content

Commit

Permalink
Requested changes fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoAmbricca committed Oct 27, 2024
1 parent 9adb540 commit d275f48
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/BalanceCards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ReactComponent as STRK } from '../assets/icons/strk.svg';
import { ReactComponent as DAI } from '../assets/icons/dai.svg';
import { getBalances } from '../utils/wallet';

const BalanceCards = ({ walletId}) => {
const BalanceCards = ({ walletId }) => {
const [balances, setBalances] = useState([
{ icon: <ETH />, title: 'ETH', balance: '0.00' },
{ icon: <USDC />, title: 'USDC', balance: '0.00' },
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/components/CardGradients.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const CardGradients = ({ additionalClassName }) => (
<div className={`card-gradients ${additionalClassName}`}>
<div className="card-gradient"></div>
<div className="card-gradient"></div>
</div>
);

export default CardGradients;
15 changes: 15 additions & 0 deletions frontend/src/components/StarMaker.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ReactComponent as Star } from "../assets/particles/star.svg";

const StarMaker = ({ starData }) => (
starData.map((star, index) => (
<Star key={index} style={{
position: 'absolute',
top: `${star.top}%`,
left: `${star.left}%`,
width: `${star.size}%`,
height: `${star.size}%`
}}/>
))
);

export default StarMaker;
18 changes: 4 additions & 14 deletions frontend/src/pages/forms/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import MultiplierSelector from '../../components/MultiplierSelector';
import { connectWallet } from '../../utils/wallet';
import { handleTransaction } from '../../utils/transaction';
import Spinner from '../../components/spinner/Spinner';
import { ReactComponent as Star } from "../../assets/particles/star.svg";
import StarMaker from '../../components/StarMaker';
import CardGradients from '../../components/CardGradients';
import { ReactComponent as AlertHexagon } from '../../assets/icons/alert_hexagon.svg';

const Form = ({ walletId, setWalletId }) => {
Expand Down Expand Up @@ -97,19 +98,8 @@ const Form = ({ walletId, setWalletId }) => {
<div className="submit">
<button type="submit" className='form-button'>Submit</button>
</div>
<div className="card-gradients forms-gradient">
<div className="card-gradient"></div>
<div className="card-gradient"></div>
</div>
{starData.map((star, index) => (
<Star key={index} style={{
position: 'absolute',
top: `${star.top}%`,
left: `${star.left}%`,
width: `${star.size}%`,
height: `${star.size}%`
}}/>
))}
<CardGradients additionalClassName={"forms-gradient"}/>
<StarMaker starData={starData}/>
</div>
</form>
<Spinner loading={loading} />
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/forms/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,13 @@ input[type="number"].error {

.balance-item label:nth-child(1){
font-size: 20px;
color: #E7ECF0;
color: var(--secondary);
letter-spacing: 0.5px;
}

.balance-item label:nth-child(2){
font-size: 32px;
color: #E7ECF0;
color: var(--secondary);
}

.balance-title{
Expand All @@ -385,6 +385,6 @@ input[type="number"].error {

.balance-title svg{
margin-right: 5px;
height: 25px !important;
width: 24px !important;
height: 25px;
width: 24px ;
}

0 comments on commit d275f48

Please sign in to comment.