created and styled call to action

This commit is contained in:
Yusuf Ipek
2021-05-10 12:29:45 +03:00
parent a796a86f4c
commit 5b8f1751b7
4 changed files with 80 additions and 3 deletions
+57
View File
@@ -1,3 +1,60 @@
.btn {
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
border-radius: 100px;
background-image: linear-gradient(
to right,
$color-primary-light,
$color-primary-dark
);
color: $color-white;
cursor: pointer;
position: relative;
overflow: hidden;
& > * {
display: inline-block;
height: 100%;
width: 100%;
transition: all 0.2s;
height: 100%;
width: 100%;
}
&__visible {
padding: 2rem 7.5rem;
}
&__invisible {
position: absolute;
padding: 2rem 0;
left: 0;
top: -100%;
}
&:hover {
background-image: linear-gradient(
to left,
$color-primary-light,
$color-primary-dark
);
}
&:hover &__visible {
transform: translateY(100%);
}
&:hover &__invisible {
top: 0;
}
&:active {
transform: translateY(-0.2rem);
}
}
.btn-inline { .btn-inline {
border: none; border: none;
color: $color-primary; color: $color-primary;
+1 -3
View File
@@ -45,9 +45,7 @@
&__count { &__count {
margin-right: auto; margin-right: auto;
} color: $color-grey-dark-3;
&__friends {
} }
} }
+12
View File
@@ -258,3 +258,15 @@
text-transform: uppercase; text-transform: uppercase;
} }
} }
.cta {
padding: 3.5rem 0;
text-align: center;
&__book-now {
font-size: 1.5rem;
font-weight: 300;
text-transform: uppercase;
margin-bottom: 2.5rem;
}
}
+10
View File
@@ -129,6 +129,16 @@ function HotelView() {
</button> </button>
</div> </div>
</div> </div>
<div className="cta">
<h2 className="cta__book-now">
Good news! We have 4 free roms for your selected dates!
</h2>
<button className="btn">
<span className="btn__visible">Book now</span>
<span className="btn__invisible">Only 4 rooms left</span>
</button>
</div>
</main> </main>
); );
} }