Skip to content

Commit

Permalink
Add new icon and styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
cenksari committed Nov 24, 2024
1 parent f825d88 commit 8582ab5
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
Binary file modified public/favicon.ico
Binary file not shown.
7 changes: 3 additions & 4 deletions public/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ button,
.readonly-input {
border: none;
border-radius: 0;
appearance: none;
vertical-align: middle;
-webkit-appearance: none;
transition: all 0.5s ease;
Expand Down Expand Up @@ -1101,8 +1102,7 @@ header .header-right .header-user .signout i {
}

.trade-history-row table td {
font-size: 0.9em;
font-weight: 500;
font-size: 0.8em;
padding-bottom: 20px;
}

Expand Down Expand Up @@ -1389,9 +1389,8 @@ header .header-right .header-user .signout i {
}

.orders-row table td {
font-size: 0.9em;
font-weight: 500;
padding: 10px;
font-size: 0.8em;
}

.orders-row .white {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Widgets/Limits/LimitsRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface IProps {

const LimitsRow = ({ item }: IProps): JSX.Element => (
<div className='limits-row flex flex-center flex-space-between no-select'>
<div>
<div className='flex flex-v-center'>
<div className='icon cover' style={{ backgroundImage: `url('${item.icon}')` }} />
<strong>{item.currency}</strong>
</div>
Expand Down
56 changes: 46 additions & 10 deletions src/components/Widgets/TradeHistory/TradeHistory.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState, useEffect } from 'react';
import { useRef, useState, useEffect } from 'react';

import { Link } from 'react-router-dom';
// hooks
import useClickOutside from '../../../hooks/useClickOutside';

// components
import Box from '../../Common/Box';
Expand Down Expand Up @@ -93,18 +94,59 @@ const dataArray: IHistory[] = [
];

const TradeHistory = (): JSX.Element => {
const ref = useRef<any>(null);

const [data, setData] = useState<IHistory[]>([]);
const [menuOpened, setMenuOpened] = useState<boolean>(false);

useClickOutside(ref, () => setMenuOpened(false));

useEffect(() => {
setData(dataArray);
}, []);

/**
* Toggles the state of the menu to open or close.
*/
const handleMenuOpen = (): void => {
setMenuOpened(!menuOpened);
};

return (
<Box>
<div className='box-title box-vertical-padding box-horizontal-padding no-select'>
Piyasa geçmişi
<div ref={ref} className='flex flex-center flex-space-between'>
Piyasa geçmişi
<button type='button' className='box-icon pointer' onClick={() => handleMenuOpen()}>
<i className='material-icons'>more_vert</i>
</button>
{menuOpened && (
<div className='box-dropdown'>
<ul>
<li>
<button type='button'>
<i className='material-icons'>settings</i>
Button 1
</button>
</li>
<li>
<button type='button'>
<i className='material-icons'>favorite</i>
Button 2
</button>
</li>
<li>
<button type='button'>
<i className='material-icons'>info</i>
Button 3
</button>
</li>
</ul>
</div>
)}
</div>
</div>
<div className='box-content box-content-height'>
<div className='box-content box-content-height-nobutton'>
<div className='trade-history-row'>
{data && data.length > 0 && (
<table>
Expand All @@ -125,12 +167,6 @@ const TradeHistory = (): JSX.Element => {
)}
</div>
</div>
<div className='box-button box-vertical-padding box-horizontal-padding'>
<Link to='/market' className='button button-purple button-medium button-block'>
Daha fazla
<i className='material-icons button-icon-right'>chevron_right</i>
</Link>
</div>
</Box>
);
};
Expand Down

0 comments on commit 8582ab5

Please sign in to comment.