Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Buttons added #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions src/css/Button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
.all-button-container {
background-color: var(--fifth-color);
display: inline-block;
padding: 1.2rem;
border-radius: 1rem;
display: flex;
flex-direction: column;
gap: 10px;
}

.primary-btn {
background-image: var(--background-main-color);
color: var(--ternary-color);
text-align: center;
font-weight: bolder;
border: none;
}

.primary-btn:hover {
transform: scale(1.03);
}

.secondary-btn {
background: var(--background-main-color);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
border: 2px solid var(--secondary-color);
text-align: center;
font-weight: bolder;
}

.secondary-btn:hover {
transform: scale(1.03);
}

.link-btn {
text-decoration: underline;
text-decoration-color: var(--secondary-color);
text-decoration-thickness: 0.1rem;
background-color: Transparent;
color: --primary-color;
text-align: center;
font-weight: bolder;
border: none;
}

.link-btn:hover {
text-decoration-color: --primary-color;
background-color: var(--ternary-color);
color: var(--secondary-color);
}

.icon-container {
display: flex;
gap: 0.4rem;
}

.icon-btn1 {
background-color: transparent;
border: none;
}

.icon-btn2 {
background-color: transparent;
border: none;
}

.icon-btn2:hover {
transform: scale(1.2);
}

.icon-style {
background-color: transparent;
border: none;
}

.icon-btn1:hover {
background-color: var(--sixth-color);
}

.heart {
color: var(--sixth-color);
}

.heart:hover {
color: var(--ternary-color);
}

.icon-style:hover {
background-color: var(--seventh-color);
}

.float-hover:hover {
color: var(--ternary-color);
}

.cart-icon-link:hover {
transform: scale(1.03);
}

.icon-text-btn {
background-image: var(--background-main-color);
border-radius: 1.5rem;
color: var(--ternary-color);
display: block;
padding: 0.5rem 1rem;
font-weight: bolder;
font-size: 1.1rem;
}

.icon-text-btn:hover {
background: var(--background-secondary-color);
-webkit-background-clip: text;
-webkit-text-fill-color: white;
-webkit-background-composite: var(--ternary-color);
border: 2px var(--primary-color) solid;
}

.cart-icon {
padding-right: 0.8rem;
height: 1.2rem;
}

.button-link {
text-decoration: none;
}
156 changes: 156 additions & 0 deletions src/pages/Button.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
import cartImg from "../images/cart-fill.svg";
const Button = () => {
return (
<>
<main>
<div class="component-container">
<h1 class="heading-text-utility-bigger">BUTTONS</h1>
<p class="subtext">
CSS buttons refer to styled HTML buttons that developers customize
to match their website designs.
</p>
<hr color="yellow" size="1" />
<div class="snippet">
<iframe
src="https://carbon.now.sh/embed?bg=rgba%28255%2C255%2C255%2C1%29&t=seti&wt=none&l=htmlmixed&width=680&ds=true&dsyoff=20px&dsblur=68px&wc=true&wa=true&pv=56px&ph=52px&ln=false&fl=1&fm=Hack&fs=10px&lh=140%25&si=false&es=1x&wm=false&code=%253Cdiv%2520class%253D%2522all-button-container%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cdiv%2520class%253D%2522primary-container%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Ca%2520href%253D%2522%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cbutton%2520class%253D%2522primary-btn%2520button-design%2522%253EPrimary%2520Button%253C%252Fbutton%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fa%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fdiv%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cdiv%2520class%253D%2522secondary-container%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Ca%2520href%253D%2522%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cbutton%2520class%253D%2522secondary-btn%2520button-design%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520Secondary%2520Button%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fbutton%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fa%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fdiv%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cdiv%2520class%253D%2522link-container%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Ca%2520href%253D%2522%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cbutton%2520class%253D%2522link-btn%2520button-design%2522%253ELink%2520Button%253C%252Fbutton%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fa%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fdiv%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cdiv%2520class%253D%2522icon-container%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Ca%2520href%253D%2522%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cbutton%2520class%253D%2522icon-btn1%2520button-design-circle%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520width%253D%252216%2522%2520height%253D%252216%2522%2520fill%253D%2522currentColor%2522%2520class%253D%2522bi%2520bi-suit-heart-fill%2520heart%2522%2520viewBox%253D%25220%25200%252016%252016%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cpath%2520d%253D%2522M4%25201c2.21%25200%25204%25201.755%25204%25203.92C8%25202.755%25209.79%25201%252012%25201s4%25201.755%25204%25203.92c0%25203.263-3.234%25204.414-7.608%25209.608a.513.513%25200%25200%25201-.784%25200C3.234%25209.334%25200%25208.183%25200%25204.92%25200%25202.755%25201.79%25201%25204%25201z%2522%252F%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fsvg%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fsvg%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fbutton%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fa%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Ca%2520href%253D%2522%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cbutton%2520class%253D%2522icon-btn2%2520button-design-circle%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520width%253D%252216%2522%2520height%253D%252216%2522%2520fill%253D%2522currentColor%2522%2520class%253D%2522bi%2520bi-cart-fill%2520cart-icon-link%2522%2520viewBox%253D%25220%25200%252016%252016%2522%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253Cpath%2520d%253D%2522M0%25201.5A.5.5%25200%25200%25201%2520.5%25201H2a.5.5%25200%25200%25201%2520.485.379L2.89%25203H14.5a.5.5%25200%25200%25201%2520.491.592l-1.5%25208A.5.5%25200%25200%25201%252013%252012H4a.5.5%25200%25200%25201-.491-.408L2.01%25203.607%25201.61%25202H.5a.5.5%25200%25200%25201-.5-.5zM5%252012a2%25202%25200%25201%25200%25200%25204%25202%25202%25200%25200%25200%25200-4zm7%25200a2%25202%25200%25201%25200%25200%25204%25202%25202%25200%25200%25200%25200-4zm-7%25201a1%25201%25200%25201%25201%25200%25202%25201%25201%25200%25200%25201%25200-2zm7%25200a1%25201%25200%25201%25201%25200%25202%25201%25201%25200%25200%25201%25200-2z%2522%252F%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fsvg%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fbutton%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C%252Fa%253E%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%2520%253C"
sandbox="allow-scripts allow-same-origin"
title="button"
></iframe>
</div>
<hr color="yellow" size="1" />
<div id="standard-area">
<h2 class="heading-text-utility-medium">Standard Buttons</h2>
</div>
<div class="all-button-container">
<div class="primary-container">
<a href="">
<button class="primary-btn button-design">
Primary Button
</button>
</a>
</div>

<div class="secondary-container">
<a href="">
<button class="secondary-btn button-design">
Secondary Button
</button>
</a>
</div>

<div class="link-container">
<a href="">
<button class="link-btn button-design">Link Button</button>
</a>
</div>

<div class="icon-container">
<a href="">
<button class="icon-btn1 button-design-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
class="bi bi-suit-heart-fill heart"
viewBox="0 0 16 16"
>
<path d="M4 1c2.21 0 4 1.755 4 3.92C8 2.755 9.79 1 12 1s4 1.755 4 3.92c0 3.263-3.234 4.414-7.608 9.608a.513.513 0 0 1-.784 0C3.234 9.334 0 8.183 0 4.92 0 2.755 1.79 1 4 1z" />
</svg>
</button>
</a>

<a href="">
<button class="icon-btn2 button-design-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
class="bi bi-cart-fill cart-icon-link"
viewBox="0 0 16 16"
>
<path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" />
</svg>
</button>
</a>
</div>

<div class="icon-text-container">
<a href="" class="button-link">
<button class="icon-text-btn button-design">
<img src={cartImg} class="cart-icon" alt="cart" />
Add to Cart
</button>
</a>
</div>

<div class="float-container">
<a href="">
<button class="icon-style button-design-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
class="bi bi-plus-circle-fill plus float-hover"
viewBox="0 0 16 16"
>
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z" />
</svg>
</button>
</a>

<a href="">
<button class="icon-style button-design-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
class="bi bi-hand-thumbs-up-fill float-hover"
viewBox="0 0 16 16"
>
<path d="M6.956 1.745C7.021.81 7.908.087 8.864.325l.261.066c.463.116.874.456 1.012.965.22.816.533 2.511.062 4.51a9.84 9.84 0 0 1 .443-.051c.713-.065 1.669-.072 2.516.21.518.173.994.681 1.2 1.273.184.532.16 1.162-.234 1.733.058.119.103.242.138.363.077.27.113.567.113.856 0 .289-.036.586-.113.856-.039.135-.09.273-.16.404.169.387.107.819-.003 1.148a3.163 3.163 0 0 1-.488.901c.054.152.076.312.076.465 0 .305-.089.625-.253.912C13.1 15.522 12.437 16 11.5 16H8c-.605 0-1.07-.081-1.466-.218a4.82 4.82 0 0 1-.97-.484l-.048-.03c-.504-.307-.999-.609-2.068-.722C2.682 14.464 2 13.846 2 13V9c0-.85.685-1.432 1.357-1.615.849-.232 1.574-.787 2.132-1.41.56-.627.914-1.28 1.039-1.639.199-.575.356-1.539.428-2.59z" />
</svg>
</button>
</a>

<a href="">
<button class="icon-style button-design-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
class="bi bi-twitter float-hover"
viewBox="0 0 16 16"
>
<path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z" />
</svg>
</button>
</a>
</div>
</div>
</div>
</main>

<right-aside>
<div class="right-aside-container">
<ul class="nav-list-main ">
<li>
<h3 class="on-this-page">On this page</h3>
<ul class="nav-list-sub right-list">
<li>
<a href="#standard-area">Standard Buttons</a>
</li>
</ul>
</li>
</ul>
</div>
</right-aside>
</>
);
};

export default Button;