Skip to content

Commit

Permalink
feat: button completed
Browse files Browse the repository at this point in the history
  • Loading branch information
maitrakhatri committed Jan 28, 2022
1 parent 355090a commit 5350901
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
79 changes: 79 additions & 0 deletions button/button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@import url(../style.css);

.btn {
border: none;
padding: .5rem 1rem;
color: white;
font-size: 16px;
border-radius: 2px;
background-color: #fff;
}

.btn:hover {
cursor: pointer;
}

.btn-primary {
background-color: var(--primary);
}

.btn-secondary {
background-color: var(--secondary);
}

.btn-success {
background-color: var(--success);
}

.btn-warning {
background-color: var(--warning);
}
.btn-danger {
background-color: var(--danger);
}

.btn-outline-primary {
border: 2px solid var(--primary);
color: var(--primary);
}

.btn-outline-secondary {
border: 2px solid var(--secondary);
color: var(--secondary);
}

.btn-outline-success {
border: 2px solid var(--success);
color: var(--success)
}

.btn-outline-warning {
border: 2px solid var(--warning);
color: var(--warning);
}
.btn-outline-danger {
border: 2px solid var(--danger);
color: var(--danger);
}

.btn-hover.btn-outline-primary:hover {
background-color: var(--primary);
color: white;
}

.btn-hover.btn-outline-secondary:hover {
background-color: var(--secondary);
color: white;
}
.btn-hover.btn-outline-success:hover {
background-color: var(--success);
color: white;
}
.btn-hover.btn-outline-warning:hover {
background-color: var(--warning);
color: white;
}
.btn-hover.btn-outline-danger:hover {
background-color: var(--danger);
color: white;
}
47 changes: 47 additions & 0 deletions button/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Button</title>
<link rel="stylesheet" href="button.css">
<style>
div {
padding: 1rem;
margin: 1rem;
}

button {
margin: 1rem;
}
</style>
</head>
<body>

<div>
<button class="btn btn-primary">Primary Button</button>
<button class="btn btn-secondary">Secondary Button</button>
<button class="btn btn-success">Success Button</button>
<button class="btn btn-warning">Warning Button</button>
<button class="btn btn-danger">Danger Button</button>
</div>

<div>
<button class="btn btn-outline-primary">Outline Primary Button</button>
<button class="btn btn-outline-secondary"> OutlineSecondary Button</button>
<button class="btn btn-outline-success">Outline Success Button</button>
<button class="btn btn-outline-warning">Outline Warning Button</button>
<button class="btn btn-outline-danger">Outline Danger Button</button>
</div>

<div>
<button class="btn btn-hover btn-outline-primary">Hoverable Outline Primary Button</button>
<button class="btn btn-hover btn-outline-secondary">Hoverable Outline Secondary Button</button>
<button class="btn btn-hover btn-outline-success">Hoverable Outline Success Button</button>
<button class="btn btn-hover btn-outline-warning">Hoverable Outline Warning Button</button>
<button class="btn btn-hover btn-outline-danger">Hoverable Outline Danger Button</button>
</div>

</body>
</html>

0 comments on commit 5350901

Please sign in to comment.