Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyvan0111 committed Jun 3, 2024
1 parent 81a9ab8 commit cee8e73
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
11 changes: 8 additions & 3 deletions src/components/atoms/icons/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ interface Props extends React.HTMLAttributes<HTMLSpanElement> {
cursor?: string;
}

const Icon = ({ type, size = 1, color = 'white', cursor='pointer', onClick }: Props) => (
const Icon = ({
type,
size = 1,
color = 'white',
cursor = 'pointer',
onClick,
}: Props) => (
<span
className={`las la-${type}`}
style={{ fontSize: `${size}rem`, cursor: cursor, color: color }}
onClick={onClick}
/>
)
;
);
export default Icon;
<p>Test</p>;
20 changes: 16 additions & 4 deletions src/components/molecules/tables/eventTable/eventTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,23 @@ const EventTable = () => {
return (
<>
{active ? (
<Icon type="calendar-check" cursor="default" color="green" size={2}></Icon>
) : (dateOri.getTime() > dateNow2.getTime()) ? (
<Icon type="calendar-day" cursor="default" color="orange" size={2}></Icon>
<Icon
type="calendar-check"
cursor="default"
color="green"
size={2}></Icon>
) : dateOri.getTime() > dateNow2.getTime() ? (
<Icon
type="calendar-day"
cursor="default"
color="orange"
size={2}></Icon>
) : (
<Icon type="calendar-times" cursor="default" color="red" size={2}></Icon>
<Icon
type="calendar-times"
cursor="default"
color="red"
size={2}></Icon>
)}
</>
);
Expand Down
8 changes: 4 additions & 4 deletions src/components/pages/admin/AdminPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ const AdminPage = () => {
type="calendar-check"
cursor="default"
color="green"
style={{ fontSize: '20px'}}
/>
style={{ fontSize: '20px' }}
/>
</p>
<p style={{ fontSize: '20px', margin: '0 8px' }}>
Upcoming:{' '}
<Icon
type="calendar-day"
cursor="default"
color="orange"
style={{ fontSize: '20px'}}
/>
style={{ fontSize: '20px' }}
/>
</p>
<p style={{ fontSize: '20px', margin: '0 8px' }}>
Inactive:{' '}
Expand Down

0 comments on commit cee8e73

Please sign in to comment.