Skip to content
This repository was archived by the owner on Feb 23, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import React from 'react';
import { Meta, Story } from '@storybook/react';
import { createStoryTitle } from '../../Constants';
import { FeaturedProfilesCard, IFeaturedProfilesCardProps, FeaturedProfilesCount} from "index";

const profiles = [
{
image:
'https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?cs=srgb&dl=pexels-pixabay-220453.jpg&fm=jpg',
initials: 'AC',
id: 2345,
},
{
image:
'https://images.pexels.com/photos/415829/pexels-photo-415829.jpeg?cs=srgb&dl=pexels-pixabay-415829.jpg&fm=jpg',
initials: 'BD',
id: 6312,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'CG',
id: 5455,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'TY',
id: 5765,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'ER',
id: 5098,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'GC',
id: 6355,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'YN',
id: 7643,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'OY',
id: 3984,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'MN',
id: 1734,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'CG',
id: 9034,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'CG',
id: 9034,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'CG',
id: 9034,
},
{
image:
'https://images.pexels.com/photos/3763188/pexels-photo-3763188.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-3763188.jpg&fm=jpg',
initials: 'CG',
id: 9034,
},
];

export default {
title: createStoryTitle('FeaturedProfilesCount'),
component: FeaturedProfilesCount,
subcomponent: FeaturedProfilesCard,
args:{
profileData: profiles,
}
}as Meta;

export const Basic: Story<IFeaturedProfilesCardProps> = (args) => (
<><FeaturedProfilesCard {...args}/><FeaturedProfilesCount {...args}/></>
)
21 changes: 21 additions & 0 deletions src/Containers/FeaturedProfilesCount/FeaturedProfilesCount.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import styled from 'styled-components';
import {IFeaturedProfilesCardProps} from 'index';

export const FeaturedProfilesCount: React.FC<IFeaturedProfilesCardProps> = ({
profileData, //the array of profiles to be displayed.
...props
}): React.ReactElement => (
<CountContainer>{profileData.length}</CountContainer>
)

const CountContainer = styled.span`
position: relative;
top: -105px;
left: 660px;
color: black;
font-size: 50px

`;

//todo Make location change with amount of profiles (currently having issues trying to make Featured profile card not generate a new line without being able to edit it)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

3 changes: 2 additions & 1 deletion src/Containers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,5 @@ export * from './CustomerProfile/CustomerProfile';
export * from './CreatedDate/CreatedDate';
export * from './CRMRow/CRMRow';
export * from './CRMTable/CRMTable';
export * from './LimitedTimeBanner/LimitedTimeBanner';
export * from './LimitedTimeBanner/LimitedTimeBanner';
export * from './FeaturedProfilesCount/FeaturedProfilesCount';