Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from taraldefi/fix/entityCard
Browse files Browse the repository at this point in the history
Fix/entity card
  • Loading branch information
Aman-zishan committed Jul 24, 2023
2 parents fc68c69 + edec500 commit d648110
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 22 deletions.
63 changes: 55 additions & 8 deletions src/Entity/Entity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
:hover {
box-shadow: initial;
}
#icon {
padding: 10px;
position: absolute;
right: -5px;
top: 2px;
}
display: flex;
position: relative;
flex-direction: column;
padding: 20px 0px 20px 16px;
width: fit-content;
Expand Down Expand Up @@ -53,9 +46,63 @@
}
}

div:last-of-type {
.optionsContainer {
margin-left: auto;
}
.modalContainer {
position: absolute;

&.active {
width: 148px;
height: 192px;
background-color: #fff;
position: absolute;
z-index: 99;
border-radius: 16px;
box-shadow: 3px 18px 36px 1px rgba(100, 116, 139, 0.13);
-webkit-box-shadow: 3px 18px 36px 1px rgba(100, 116, 139, 0.13);
-moz-box-shadow: 3px 18px 36px 1px rgba(100, 116, 139, 0.13);
}
}
.modal {
.iconEntityOption {
opacity: 0.7;
&.active {
opacity: 1;
}
}
.modalMenue {
display: flex;
flex-direction: column;
justify-content: space-around;
padding: 24px;
gap: 20px;

:nth-child(1) {
display: flex;
gap: 13px;
align-items: center;
}

:nth-child(2) {
display: flex;
gap: 16px;
align-items: center;
}

:nth-child(4) {
display: flex;
gap: 15px;
align-items: center;
}

:nth-child(3) {
width: 100%;
height: 1px;
background-color: rgba(13, 132, 137, 0.3);
}
}
}
}

.bottomContent {
Expand Down
1 change: 0 additions & 1 deletion src/Entity/Entity.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ const data = {

EntityCard.args = {
entityData: data,
onClick: () => {},
};
14 changes: 3 additions & 11 deletions src/Entity/Entity.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
// Generated with util/create-component.js
import React from 'react';
import { MoreVertical } from 'react-feather';
import { EntityType } from './Entity.types';
import './Entity.scss';

export function Entity({ entityData, onClick }: EntityType) {
export function Entity({ entityData, modal }: EntityType) {
return (
<div className="entityWrapper">
<div
onClick={() => {
onClick();
}}
id="icon"
>
<MoreVertical></MoreVertical>
</div>
<div className={'entityWrapper'}>
<div className="entityTopContent">
<div className="entityImageContainer">
<img
Expand All @@ -29,6 +20,7 @@ export function Entity({ entityData, onClick }: EntityType) {
<span>{entityData.title}</span>
<span>55-NB</span>
</div>
<div className="optionsContainer">{modal}</div>
</div>
<div className="bottomContent">
<div className="registrationContainer">
Expand Down
18 changes: 16 additions & 2 deletions src/Entity/Entity.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React from "react";

export interface EntityDataType {
id: number;
Expand All @@ -10,5 +10,19 @@ export interface EntityDataType {
}
export interface EntityType {
entityData: EntityDataType;
onClick?: () => void;
modal?: React.ReactNode;
}
export interface EntityViewType {
infoData: InfoDataType[];
}

export interface InfoDataType {
BeneficialOwner: string;
CodeAbbreviation: string;
Nationality: string;
HeadquartersLocation: string;
IndustryType: string;
CoreBusiness: string;
IncorporationDate: string;
LegalForm: string;
}

0 comments on commit d648110

Please sign in to comment.