File tree Expand file tree Collapse file tree 2 files changed +20
-30
lines changed
src/components/achievements Expand file tree Collapse file tree 2 files changed +20
-30
lines changed Original file line number Diff line number Diff line change 11import React , { FC } from "react" ;
2- import styled from ' @emotion/styled' ;
2+ import styled from " @emotion/styled" ;
33import { AchievementInterface } from "./achievementList" ;
44
5-
6-
75export interface achievmentItemProps {
8- achievement : AchievementInterface
9- className ?: string
6+ achievement : AchievementInterface ;
7+ className ?: string ;
108}
119
1210export const AchievmentItem : FC < achievmentItemProps > = ( { achievement, className } ) => {
1311 return (
1412 < >
1513 < ImgContainer >
16- < img className = { className } src = { achievement . image } alt = { achievement . name } title = { achievement . description } />
14+ < img className = { className } src = { achievement . image } alt = { achievement . name } title = { achievement . description } width = "100%" height = "100%" />
1715 </ ImgContainer >
1816 </ >
1917 ) ;
2018} ;
2119
22-
2320const ImgContainer = styled . div `
24- display:flex;
25- min-width:25px;
26- min-height: 25px;
27- width:5em;
21+ display: flex;
22+ width: 5em;
2823 height: 5em;
29- `
30-
24+ ` ;
Original file line number Diff line number Diff line change 11import React , { FC } from "react" ;
2- import styled from ' @emotion/styled' ;
2+ import styled from " @emotion/styled" ;
33import { achievementList } from "./achievementList" ;
44import { AchievmentItem } from "./achievementItem" ;
55
6- interface AchievementsProps {
7- }
8-
9- export const Achievements : FC < AchievementsProps > = ( props ) => {
6+ interface AchievementsProps { }
107
8+ export const Achievements : FC < AchievementsProps > = props => {
119 return (
1210 < Container >
1311 < h1 > Logros</ h1 >
14- < ContainerAchievements >
15- { achievementList && achievementList . map ( item => < AchievmentItem achievement = { item } className = { item . unlock } /> ) }
16- </ ContainerAchievements >
12+ < ContainerAchievements > { achievementList && achievementList . map ( item => < AchievmentItem achievement = { item } className = { item . unlock } /> ) } </ ContainerAchievements >
1713 </ Container >
1814 ) ;
1915} ;
2016
2117const Container = styled . div `
22- display:flex;
23- flex-direction:column;
24- `
18+ display: flex;
19+ flex-direction: column;
20+ ` ;
2521const ContainerAchievements = styled . div `
26- display:flex;
27- flex-direction:wrap;
22+ display: flex;
23+ flex-direction: wrap;
2824
29- & > div{
30- margin-left:10px;
31- padding:10px;
25+ & > div {
26+ margin-left: 10px;
27+ padding: 10px;
3228 border-radius: 15px;
3329 }
3430
3531 & > div > img:not(.unlock) {
3632 filter: grayscale(1);
3733 }
38- `
34+ ` ;
You can’t perform that action at this time.
0 commit comments