-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: ItemCard indents and removed duplicate component imports
- Loading branch information
1 parent
e56c206
commit 8d8dc82
Showing
1 changed file
with
47 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,69 @@ | ||
<template> | ||
<div class="item-card"> | ||
<div class="left"> | ||
<Icon icon="book" size="90" color="white" /> | ||
<div class="info"> | ||
<p>{{ title }}</p> | ||
<p>{{ description }}</p> | ||
</div> | ||
</div> | ||
<div v-if="warning === 'true'" class="right"> | ||
<Icon icon="warning" size="35" /> | ||
</div> | ||
<div class="item-card"> | ||
<div class="left"> | ||
<Icon icon="book" size="90" color="white" /> | ||
<div class="info"> | ||
<p>{{ title }}</p> | ||
<p>{{ description }}</p> | ||
</div> | ||
</div> | ||
<div v-if="warning === 'true'" class="right"> | ||
<Icon icon="warning" size="35" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Icon from "./icon.vue"; | ||
export default { | ||
name: "ItemCard", | ||
props: { | ||
title: String, | ||
description: String, | ||
warning: Boolean, | ||
}, | ||
components: { | ||
Icon, | ||
name: "ItemCard", | ||
props: { | ||
title: String, | ||
description: String, | ||
warning: Boolean, | ||
}, | ||
components: { | ||
Icon, | ||
Icon | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss"> | ||
.item-card { | ||
width: 667px; | ||
height: 116px; | ||
background: #1D243A; | ||
border-radius: 8px; | ||
width: 667px; | ||
height: 116px; | ||
background: #1d243a; | ||
border-radius: 8px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 13px; | ||
.left { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 13px; | ||
.left { | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
width: 100%; | ||
height: 100%; | ||
.info { | ||
margin-left: 20px; | ||
display: flex; | ||
flex-direction: column; | ||
.info { | ||
margin-left: 20px; | ||
display: flex; | ||
flex-direction: column; | ||
p { | ||
color: #fff; | ||
font-size: 32px; | ||
font-family: "Outfit"; | ||
font-weight: 700; | ||
} | ||
} | ||
} | ||
.right { | ||
display: flex; | ||
align-items: flex-start; | ||
height: 100%; | ||
p { | ||
color: #fff; | ||
font-size: 32px; | ||
font-family: "Outfit"; | ||
font-weight: 700; | ||
} | ||
} | ||
} | ||
.right { | ||
display: flex; | ||
align-items: flex-start; | ||
height: 100%; | ||
} | ||
} | ||
</style> |