Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PortalMEC-React
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
a473554a
Commit
a473554a
authored
4 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
finish to build the material card
parent
6f23caa6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
6 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
,
!39
Update admin system
,
!32
Homologa
,
!31
Fix console error
,
!27
Training materials
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Components/MaterialCard.js
+68
-30
68 additions, 30 deletions
src/Components/MaterialCard.js
with
68 additions
and
30 deletions
src/Components/MaterialCard.js
+
68
−
30
View file @
a473554a
...
@@ -16,40 +16,78 @@ GNU Affero General Public License for more details.
...
@@ -16,40 +16,78 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
You should have received a copy of the GNU Affero General Public License
along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
import
React
,
{
Component
}
from
'
react
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
Card
from
'
@material-ui/core/Card
'
;
import
Card
from
'
@material-ui/core/Card
'
;
import
CardContent
from
'
@material-ui/core/CardContent
'
;
import
CardContent
from
'
@material-ui/core/CardContent
'
;
import
CardActions
from
'
@material-ui/core/CardActions
'
;
import
CardActions
from
'
@material-ui/core/CardActions
'
;
import
Typography
from
'
@material-ui/core/Typography
'
;
import
Typography
from
'
@material-ui/core/Typography
'
;
import
livro
from
"
../img/laranja/LIVRO_DIGITAL.jpg
"
;
import
Library
from
'
@material-ui/icons/LibraryBooks
'
;
import
Library
from
'
@material-ui/icons/LibraryBooks
'
;
import
Rating
from
'
@material-ui/lab/Rating
'
;
import
StarBorderIcon
from
'
@material-ui/icons/StarBorder
'
;
import
Grid
from
'
@material-ui/core/Grid
'
;
import
styled
from
'
styled-components
'
;
import
Button
from
'
@material-ui/core/Button
'
;
import
ExpandMoreRoundedIcon
from
'
@material-ui/icons/ExpandMoreRounded
'
;
import
ExpandLessRoundedIcon
from
'
@material-ui/icons/ExpandLessRounded
'
;
export
default
function
MaterialCard
(
props
)
{
class
MaterialCard
extends
Component
{
const
[
expanded
,
setExpanded
]
=
useState
(
false
);
constructor
(
props
)
{
super
(
props
);
const
thumb
=
require
(
`../../public/
${
props
.
thumb
}
`
)
this
.
state
=
{
thumbnail
:
livro
,
return
(
};
<
Card
>
}
<
img
src
=
{
thumb
}
alt
=
"
thumbnail do recurso
"
/>
render
(){
<
CardContent
style
=
{{
height
:
"
60px
"
,
textAlign
:
"
left
"
,
paddingBottom
:
"
0px
"
,
width
:
"
100%
"
}}
>
return
(
<
Title
>
<
Card
>
{
props
.
name
}
<
img
src
=
{
this
.
state
.
thumbnail
}
alt
=
"
thumbnail do recurso
"
/>
<
/Title
>
<
CardContent
style
=
{{
height
:
"
60%
"
,
textAlign
:
"
left
"
,
paddingBottom
:
"
0px
"
}}
>
<
/CardContent
>
<
Typography
variant
=
"
body2
"
color
=
"
textSecondary
"
component
=
"
p
"
style
=
{{
overflow
:
"
hidden
"
,
fontSize
:
"
0.8em
"
}}
>
<
CardActions
>
{
this
.
props
.
name
}
<
Grid
container
direction
=
"
column
"
justify
=
"
flex-start
"
alignItems
=
"
flex-start
"
style
=
{{
marginLeft
:
"
5px
"
}}
>
<
/Typography
>
<
Grid
item
>
<
/CardContent
>
<
Rating
<
CardActions
style
=
{{
justifyContent
:
"
space-between
"
}}
>
name
=
"
customized-empty
"
<
Library
style
=
{{
color
:
"
#e81f4f
"
}}
/
>
value
=
{
props
.
score
}
<
/CardActions
>
precision
=
{
0.5
}
<
CardActions
style
=
{{
borderTop
:
"
1px solid #e5e5e5
"
,
justifyContent
:
"
space-between
"
}}
>
style
=
{{
color
:
"
#666
"
}}
<
Typography
>
Expandir
??<
/Typography
>
emptyIcon
=
{
<
StarBorderIcon
fontSize
=
"
inherit
"
/>
}
<
/CardActions
>
readOnly
<
/Card
>
/>
);}
<
/Grid
>
}
<
Grid
container
direction
=
"
row
"
alignItems
=
"
center
"
>
<
Library
style
=
{{
color
:
"
#e81f4f
"
}}
/
>
<
SizedBox
/>
export
default
MaterialCard
;
<
Typography
variant
=
"
body2
"
color
=
"
textSecondary
"
component
=
"
p
"
style
=
{{
overflow
:
"
hidden
"
,
fontSize
:
"
0.8em
"
}}
>
{
props
.
modules
.
length
}
módulos
<
/Typography
>
<
/Grid
>
<
/Grid
>
<
/CardActions
>
<
CardActions
style
=
{{
borderTop
:
"
1px solid #e5e5e5
"
,
justifyContent
:
"
center
"
}}
>
<
Button
color
=
"
secondary
"
endIcon
=
{
expanded
?
<
ExpandLessRoundedIcon
/>
:
<
ExpandMoreRoundedIcon
/>
}
onClick
=
{()
=>
props
.
handleExpand
(
props
.
id
)}
>
Expandir
<
/Button
>
<
/CardActions
>
<
/Card
>
)
}
const
SizedBox
=
styled
.
div
`
width : 5px;
`
const
Title
=
styled
(
Typography
)
`
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 10px;
font-size: 1.2em;
line-height: 1.1;
max-height: 46px;
color: #666;
`
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment