File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
frontend/src/components/card Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ .Flex-card {
2+ margin-left : 1.25% ;
3+ margin-right : 1.25% ;
4+ flex : 1 ;
5+ min-width : 40% ;
6+ max-width : 500px ;
7+ display : flex;
8+ flex-wrap : wrap;
9+ }
10+
11+ .Flex-card p {
12+ color : orange;
13+ flex : 1 ;
14+ }
15+
16+ .Tag {
17+ margin-right : 5px ;
18+ }
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import Card from 'react-bootstrap/Card' ;
3+ import Badge from 'react-bootstrap/Badge' ;
4+ import './Card.css' ;
5+
6+ export default ( props ) => {
7+
8+ const renderTag = ( tag , i ) => {
9+ return (
10+ < Badge
11+ className = "Tag"
12+ pill
13+ variant = { tag . variant }
14+ index = { i } >
15+ { tag . text }
16+ </ Badge >
17+ ) ;
18+ } ;
19+
20+ return (
21+ < >
22+ < Card className = "Flex-card" bg = "light" >
23+ < Card . Body >
24+ < Card . Title > { props . repository } </ Card . Title >
25+ < Card . Subtitle className = "mb-2 text-muted" > { props . author } </ Card . Subtitle >
26+ < Card . Text className = "Content" >
27+ { props . readme }
28+ </ Card . Text >
29+ < div >
30+ { props . tags . map ( ( tag , i ) => renderTag ( tag , i ) ) }
31+ </ div >
32+ </ Card . Body >
33+ </ Card >
34+ </ >
35+ ) ;
36+ }
You can’t perform that action at this time.
0 commit comments