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 #28 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 261b20c + 121113a commit b9ffe60
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
11 changes: 4 additions & 7 deletions src/Entity/Entity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
:hover {
box-shadow: initial;
}
width: 350px;
display: flex;
flex-direction: column;
padding: 20px 0px 20px 16px;
width: fit-content;
height: fit-content;
border: 1px solid #e2e8f0;
border-radius: 16px;
Expand All @@ -15,21 +15,18 @@
display: flex;
padding-bottom: 16px;
border-bottom: 1px solid #e2e8f0;
width: 300px;

.entity--image--container {
position: fixed;
width: 80px;
height: 80px;
contain: content;
border-radius: 16px;
}

.entity--title--box {
left: 85px;
width: 50%;
gap: 5px;
padding: 16px 45px 16px 18px;
margin-left: 80px;
display: flex;
flex-direction: column;

Expand All @@ -41,7 +38,6 @@
font-size: 24px;
color: #003c6e;
font-weight: bold;
width: 65%;
}

:nth-child(2) {
Expand All @@ -53,7 +49,8 @@
}

.options--container {
margin-left: auto;
position: relative;
right: 10px;
}
.modal--container {
position: absolute;
Expand Down
18 changes: 17 additions & 1 deletion src/Entity/Entity.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,32 @@ export default {
const Template: StoryFn<typeof Entity> = (args) => <Entity {...args} />;

export const EntityCard = Template.bind({});
export const EntityCard2 = Template.bind({});
// More on args: https://storybook.js.org/docs/react/writing-stories/args
const data = {
id: 1,
image: 'https://figmage.com/images/7lTCh_OBOJiQQRJDQt-OY.png',
image: '/assets/logo.svg',
title: 'Lange Wiegand GmbH & Co. KG ',
registrationNo: 1,
products: 25,
applications: 25,
};

const data2 = {
id: 2,
image: '/assets/logo.svg',
title: 'Verno ',
registrationNo: 1,
products: 25,
applications: 25,
};

EntityCard.args = {
entityData: data,
modal: <div>Modal</div>,
};

EntityCard2.args = {
entityData: data2,
modal: <div>Modal</div>,
};
2 changes: 1 addition & 1 deletion src/Entity/Entity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function Entity({ entityData, modal }: EntityType) {
></img>
</div>
<div className="entity--title--box">
<span className="">{entityData.title}</span>
<span>{entityData.title}</span>
<span>55-NB</span>
</div>
<div className="options--container">{modal}</div>
Expand Down

0 comments on commit b9ffe60

Please sign in to comment.