주식 보유 카드 UI 수정 & 평가 금액 추가
This commit is contained in:
@@ -359,20 +359,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stock-balance__summary {
|
.stock-balance__summary {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
flex-wrap: wrap;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-balance__card {
|
.stock-balance__card {
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 10px;
|
padding: 10px 14px;
|
||||||
display: grid;
|
display: flex;
|
||||||
gap: 6px;
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
background: rgba(0, 0, 0, 0.2);
|
background: rgba(0, 0, 0, 0.2);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
|
flex: 1 1 120px;
|
||||||
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-balance__card strong {
|
.stock-balance__card strong {
|
||||||
@@ -388,16 +391,22 @@
|
|||||||
.stock-holdings__item {
|
.stock-holdings__item {
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 10px;
|
padding: 10px 14px;
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: minmax(0, 1.2fr) repeat(5, minmax(0, 0.6fr));
|
flex-wrap: wrap;
|
||||||
gap: 10px;
|
gap: 10px 16px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
background: rgba(255, 255, 255, 0.02);
|
background: rgba(255, 255, 255, 0.02);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 종목명 영역: 데스크톱에서는 넓게, 모바일에서 full width */
|
||||||
|
.stock-holdings__item>div:first-child {
|
||||||
|
flex: 1 1 140px;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
.stock-holdings__name {
|
.stock-holdings__name {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -410,19 +419,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stock-holdings__metric {
|
.stock-holdings__metric {
|
||||||
display: grid;
|
display: flex;
|
||||||
gap: 4px;
|
flex-direction: column;
|
||||||
justify-items: start;
|
gap: 2px;
|
||||||
|
min-width: 70px;
|
||||||
|
flex: 0 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-holdings__metric span {
|
.stock-holdings__metric span {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-holdings__metric strong {
|
.stock-holdings__metric strong {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-profit {
|
.stock-profit {
|
||||||
@@ -539,12 +552,13 @@
|
|||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.stock {
|
.stock {
|
||||||
gap: 20px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-panel {
|
.stock-panel {
|
||||||
padding: 16px;
|
padding: 14px;
|
||||||
gap: 12px;
|
gap: 10px;
|
||||||
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-filter-row {
|
.stock-filter-row {
|
||||||
@@ -553,7 +567,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stock-header h1 {
|
.stock-header h1 {
|
||||||
font-size: 28px;
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-actions {
|
.stock-actions {
|
||||||
@@ -567,7 +581,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stock-card {
|
.stock-card {
|
||||||
padding: 16px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-status>div {
|
.stock-status>div {
|
||||||
@@ -579,49 +593,59 @@
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-balance__summary {
|
/* 종목명: 모바일에서 full width로 한 줄 차지 */
|
||||||
grid-template-columns: 1fr;
|
.stock-holdings__item>div:first-child {
|
||||||
}
|
flex: 1 1 100%;
|
||||||
|
|
||||||
.stock-holdings__item {
|
|
||||||
grid-template-columns: minmax(0, 1fr);
|
|
||||||
gap: 12px;
|
|
||||||
align-items: start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stock-holdings__name {
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Metric 칩: 인라인으로 나란히, 공간 부족 시 줄바꿈 */
|
||||||
.stock-holdings__metric {
|
.stock-holdings__metric {
|
||||||
grid-template-columns: repeat(2, 1fr);
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: baseline;
|
||||||
justify-items: start;
|
gap: 4px;
|
||||||
gap: 8px 16px;
|
min-width: 0;
|
||||||
}
|
flex: 0 0 auto;
|
||||||
|
padding: 4px 10px;
|
||||||
/* Make the last item span full width if it's odd */
|
border-radius: 8px;
|
||||||
.stock-holdings__metric>*:last-child:nth-child(odd) {
|
background: rgba(255, 255, 255, 0.03);
|
||||||
grid-column: 1 / -1;
|
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-holdings__metric span {
|
.stock-holdings__metric span {
|
||||||
font-size: 11px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-holdings__metric strong {
|
.stock-holdings__metric strong {
|
||||||
font-size: 15px;
|
font-size: 13px;
|
||||||
word-break: break-word;
|
word-break: keep-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stock-holdings__name {
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 520px) {
|
@media (max-width: 420px) {
|
||||||
|
.stock-panel {
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stock-holdings__item {
|
||||||
|
padding: 10px;
|
||||||
|
gap: 6px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.stock-holdings__metric {
|
.stock-holdings__metric {
|
||||||
grid-template-columns: minmax(0, 1fr);
|
padding: 3px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stock-holdings__metric span {
|
||||||
|
font-size: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock-holdings__metric strong {
|
.stock-holdings__metric strong {
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -775,20 +799,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pf-total-summary {
|
.pf-total-summary {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
flex-wrap: wrap;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-total-summary__card {
|
.pf-total-summary__card {
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
padding: 12px;
|
padding: 10px 14px;
|
||||||
display: grid;
|
display: flex;
|
||||||
gap: 6px;
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
background: rgba(0, 0, 0, 0.2);
|
background: rgba(0, 0, 0, 0.2);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
|
flex: 1 1 110px;
|
||||||
|
min-width: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-total-summary__card strong {
|
.pf-total-summary__card strong {
|
||||||
@@ -796,8 +823,8 @@
|
|||||||
color: var(--text);
|
color: var(--text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-item {
|
.pf-item-actions {
|
||||||
grid-template-columns: minmax(0, 1.2fr) repeat(5, minmax(0, 0.55fr)) auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-item-actions {
|
.pf-item-actions {
|
||||||
@@ -863,25 +890,32 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.pf-item {
|
|
||||||
grid-template-columns: minmax(0, 1fr);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pf-add-form {
|
.pf-add-form {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-edit-row {
|
.pf-edit-row {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-total-summary {
|
.pf-item-actions {
|
||||||
grid-template-columns: repeat(2, 1fr);
|
flex: 0 0 auto;
|
||||||
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 520px) {
|
@media (max-width: 420px) {
|
||||||
.pf-total-summary {
|
.pf-add-form {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pf-total-summary__card {
|
||||||
|
padding: 8px 10px;
|
||||||
|
flex: 1 1 80px;
|
||||||
|
min-width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pf-total-summary__card strong {
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -742,6 +742,14 @@ const StockTrade = () => {
|
|||||||
: '조회 실패'}
|
: '조회 실패'}
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="stock-holdings__metric">
|
||||||
|
<span>평가금액</span>
|
||||||
|
<strong>
|
||||||
|
{item.current_price != null && item.quantity != null
|
||||||
|
? formatNumber(item.current_price * item.quantity)
|
||||||
|
: '-'}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
<div className="stock-holdings__metric">
|
<div className="stock-holdings__metric">
|
||||||
<span>수익률</span>
|
<span>수익률</span>
|
||||||
<strong
|
<strong
|
||||||
@@ -904,6 +912,14 @@ const StockTrade = () => {
|
|||||||
{formatNumber(getCurrentPrice(item))}
|
{formatNumber(getCurrentPrice(item))}
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="stock-holdings__metric">
|
||||||
|
<span>평가금액</span>
|
||||||
|
<strong>
|
||||||
|
{getCurrentPrice(item) != null && getQty(item) != null
|
||||||
|
? formatNumber(toNumeric(getCurrentPrice(item)) * toNumeric(getQty(item)))
|
||||||
|
: '-'}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
<div className="stock-holdings__metric">
|
<div className="stock-holdings__metric">
|
||||||
<span>수익률</span>
|
<span>수익률</span>
|
||||||
<strong
|
<strong
|
||||||
|
|||||||
Reference in New Issue
Block a user