Skip to content

Commit 3a1937a

Browse files
committed
Fix issues
1 parent 5699f29 commit 3a1937a

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed

src/components/AccountCard.jsx

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// AccountCard.jsx
2+
import React from 'react';
3+
import styled from 'styled-components';
4+
5+
const CardContainer = styled.div`
6+
border: 1px solid #e0e0e0;
7+
padding: 1rem;
8+
margin: 0.5rem 0;
9+
border-radius: 8px;
10+
background-color: #ffffff;
11+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
12+
transition: transform 0.2s ease-in-out;
13+
14+
&:hover {
15+
transform: translateY(-2px);
16+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
17+
}
18+
`;
19+
20+
const AccountName = styled.div`
21+
font-size: 1.1rem;
22+
font-weight: 600;
23+
color: #333;
24+
margin-bottom: 0.5rem;
25+
`;
26+
27+
const BalanceText = styled.div`
28+
font-size: 1rem;
29+
color: #666;
30+
`;
31+
32+
const StatusBadge = styled.span`
33+
font-size: 0.8rem;
34+
padding: 0.2rem 0.5rem;
35+
border-radius: 12px;
36+
background-color: #e9f7ef;
37+
color: #27ae60;
38+
margin-left: 0.5rem;
39+
`;
40+
41+
const AccountCard = ({
42+
accountName,
43+
balance,
44+
status = "Active" // Default status
45+
}) => {
46+
return (
47+
<CardContainer>
48+
<AccountName>
49+
{accountName}
50+
<StatusBadge>{status}</StatusBadge>
51+
</AccountName>
52+
<BalanceText>Balance: {balance}</BalanceText>
53+
</CardContainer>
54+
);
55+
};
56+
57+
// Optional: Add PropTypes for type checking
58+
import PropTypes from 'prop-types';
59+
60+
AccountCard.propTypes = {
61+
accountName: PropTypes.string.isRequired,
62+
balance: PropTypes.string.isRequired,
63+
status: PropTypes.string
64+
};
65+
66+
export default AccountCard;

src/components/Main.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import styled from 'styled-components';
3-
import AccountCard from '../AccountCard';
4-
import { mainFunction } from './src/app/coinjoin/main_function.jsx';
3+
import AccountCard from '../components/AccountCard';
54

65
const MainContainer = styled.div`
76
padding: 2rem;

0 commit comments

Comments
 (0)