Skip to content

Commit

Permalink
feat: replaced inline SVG by components
Browse files Browse the repository at this point in the history
  • Loading branch information
newick authored and lutangar committed Feb 1, 2019
1 parent 9038dfe commit 2d71ba5
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 51 deletions.
50 changes: 7 additions & 43 deletions src/app/sandbox/Sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import Approves from '../../components/atoms/Approves';
import Dislikes from '../../components/atoms/Dislikes';
import Contributor from '../../components/atoms/Contributor';

import Close from '../../components/atoms/icons/Close';
import Arrow from '../../components/atoms/icons/Arrow';

import Header from '../../components/molecules/Header';
import Footer from '../../components/molecules/Footer';
import Feedbacks from '../../components/molecules/Feedbacks';
Expand All @@ -33,62 +36,23 @@ const Sandbox = () => (
<Header>
<Title>2 messages pour cette page</Title>
<ButtonClose>
<svg width="12" height="12">
<g
fill="none"
fillRule="evenodd"
stroke="#787993"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2">
<path d="M1 1l10 10M11 1L1 11" />
</g>
</svg>
<Close />
</ButtonClose>
</Header>
<Header>
<Title>
<svg width="7" height="12">
<path
fill="none"
fillRule="evenodd"
stroke="#787993"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M6.046 1L1 6.046 6.046 11" />
</svg>
<Arrow />
&nbsp;
Le Même en Mieux, il y a 8 mois
</Title>
<ButtonClose>
<svg width="12" height="12">
<g
fill="none"
fillRule="evenodd"
stroke="#787993"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2">
<path d="M1 1l10 10M11 1L1 11" />
</g>
</svg>
<Close />
</ButtonClose>
</Header>
<Header>
<Title>Aucune de vos relations n’a créé de bulle pour cette page</Title>
<ButtonClose>
<svg width="12" height="12">
<g
fill="none"
fillRule="evenodd"
stroke="#787993"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2">
<path d="M1 1l10 10M11 1L1 11" />
</g>
</svg>
<Close />
</ButtonClose>
</Header>

Expand Down
15 changes: 15 additions & 0 deletions src/components/atoms/icons/Arrow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

export default () => (
<svg width="7" height="12">
<path
fill="none"
fillRule="evenodd"
stroke="#787993"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M6.046 1L1 6.046 6.046 11" />
</svg>

);
18 changes: 14 additions & 4 deletions src/components/atoms/icons/Close.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<svg width="12" height="12">
<g fill="none" fill-rule="evenodd" stroke="#787993" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M1 1l10 10M11 1L1 11"/>
import React from 'react';

export default () => (
<svg width="12" height="12">
<g
fill="none"
fillRule="evenodd"
stroke="#787993"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2">
<path d="M1 1l10 10M11 1L1 11" />
</g>
</svg>
</svg>
);
15 changes: 11 additions & 4 deletions src/components/atoms/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import MenuButton from '../atoms/MenuButton';
import Title from '../atoms/Title';
import Type from '../atoms/Type';

// export { default } from './Approves';
// export { default } from './ButtonClose';
// export { default } from './ButtonMenu';
// export { default } from './ButtonDelete';
// export { default } from './Contributor';
// export { default } from './Dislikes';
// export { default } from './Logo';
// export { default } from './Message';
// export { default } from './SourceURL';
// export { default } from './Title';
// export { default } from '.Type';

0 comments on commit 2d71ba5

Please sign in to comment.