Skip to content

Commit

Permalink
feat(ContributorCard): added link to see examples
Browse files Browse the repository at this point in the history
  • Loading branch information
newick authored and JalilArfaoui committed Sep 6, 2019
1 parent 6d5bef1 commit 39a6a61
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
4 changes: 1 addition & 3 deletions src/components/organisms/Contributor/ContributorCompact.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React from 'react';
import styled, { css } from 'styled-components';
import styled from 'styled-components';

import Avatar from 'components/atoms/Avatar/Avatar';
import UserName from 'components/atoms/UserName/UserName';
import Like from '../../atoms/icons/types/Like';
import Stat from 'components/atoms/Stat/Stat';
import StatType from 'components/atoms/Stat/StatType';
import ContributorButton from './ContributorButton';

const ContributorWrapper = styled.div`
Expand Down
9 changes: 9 additions & 0 deletions src/components/organisms/Contributor/ContributorLarge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import styled, { css } from 'styled-components';

import Button from 'components/atoms/Button';
import Avatar from 'components/atoms/Avatar/Avatar';
import AvatarDefault from 'components/atoms/icons/AvatarDefault';
import UserName from 'components/atoms/UserName/UserName';
Expand Down Expand Up @@ -41,6 +42,12 @@ const ContributorIntro = styled.p`
color: ${props => props.theme.formBorder};
`;

const ContributionExample = styled(Button)`
margin-top: 25px;
font-size: 12px;
color: ${props => props.theme.activeColor};
`;

export const Contributor = () => (
<ContributorCard>
<ContributorWrapper>
Expand All @@ -67,6 +74,8 @@ export const Contributor = () => (
</ContributorInfos>
</ContributorWrapper>

<ContributionExample>Voir un exemple de ses bulles</ContributionExample>

<ContributorIntro>
Passionné d’infos et s’intox, je vous préviens parfois (mais pas toujours
^^) quand vous êtes en train de consulter un hoax, c’est-à-dire un message
Expand Down
8 changes: 0 additions & 8 deletions src/components/organisms/ContributorCard/Container.ts

This file was deleted.

17 changes: 8 additions & 9 deletions src/components/organisms/ContributorCard/ContributorCard.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import React from 'react';
import Container from './Container';
import ContributorDescription from './ContributorDescription';
import styled from 'styled-components';
import ContributorLarge from '../Contributor/ContributorLarge';

const Container = styled.article`
padding: 10px 15px;
background-color: #fff;
border: 1px solid #dedede;
border-radius: 8px;
`;

export const ContributorNav = () => (
<Container>
<ContributorLarge />

<ContributorDescription>
Passionné d’infos et s’intox, je vous préviens parfois (mais pas toujours
^^) quand vous êtes en train de consulter un hoax, c’est-à-dire un message
poignant, révoltant ou alarmant… mais faux ! Mes sources : Hoaxbuster,
HoaxKiller, Hoaxteam, Secuser.com.
</ContributorDescription>
</Container>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import styled, { css } from 'styled-components';

const Container = styled.p`
const Description = styled.p`
margin-top: 20px;
margin-bottom: 0;
font-size: 15px;
`;

const PlaceholderContainer = styled(Container)`
const PlaceholderDescription = styled(Description)`
display: flex;
flex-direction: column;
justify-content: center;
Expand All @@ -19,11 +19,11 @@ interface Props {
}
const ContributorDescription = ({ children }: Props) =>
children ? (
<Container>{children}</Container>
<Description>{children}</Description>
) : (
<PlaceholderContainer>
<PlaceholderDescription>
Cet utilisateur n’a pas encore ajouté une description.
</PlaceholderContainer>
</PlaceholderDescription>
);

export default ContributorDescription;

0 comments on commit 39a6a61

Please sign in to comment.