-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4ec747
commit 84a16e8
Showing
5 changed files
with
1,088 additions
and
1 deletion.
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,4 +1,3 @@ | ||
#dependencies | ||
node_modules | ||
dist | ||
.cache |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.basic-buttons { | ||
max-width: 400px; | ||
border: 1px solid #d3d3d3; | ||
padding: 1em; | ||
border-radius: 3px; | ||
background-color: #ffffff; | ||
} | ||
|
||
.props { | ||
margin-top: .5em; | ||
color: #666; | ||
display: grid; | ||
grid-template-columns: 1fr 1fr 1fr; | ||
} | ||
|
||
.props > h4 { | ||
border-bottom: 1px solid sandybrown; | ||
grid-area: 1 / 1 / span 1 / span 3; | ||
} | ||
|
||
.props > div > h5 { | ||
padding: 10px 0; | ||
} | ||
|
||
.props > div > div { | ||
margin: 5px 1px; | ||
padding: .2em .4em; | ||
font-size: .9em; | ||
background: #f2f4f5; | ||
border: 1px solid #eee; | ||
border-radius: 3px; | ||
width: fit-content; | ||
} | ||
|
||
body { | ||
margin: 1em; | ||
background-color: ghostwhite; | ||
} | ||
|
||
h1 { | ||
margin: .5em 0; | ||
font-style: italic; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Document</title> | ||
<script> | ||
function myFunction (e) { | ||
const type = e.target.parentNode.getAttribute('type'); | ||
alert('you press: '+ type + ' Button'); | ||
} | ||
</script> | ||
<link rel="stylesheet" href="./css/main.css"> | ||
</head> | ||
<body> | ||
<h1> pComponents </h1> | ||
<div class="basic-buttons"> | ||
<h3> Basic Buttons </h3> | ||
<pretty-button | ||
value="Primary" | ||
type="primary" | ||
onclick="myFunction" | ||
> | ||
</pretty-button> | ||
<pretty-button | ||
value="Danger" | ||
type="danger" | ||
onclick="myFunction" | ||
> | ||
</pretty-button> | ||
<pretty-button | ||
value="Default" | ||
type="default" | ||
onclick="myFunction" | ||
> | ||
</pretty-button> | ||
<pretty-button | ||
value="Dashed" | ||
type="dashed" | ||
onclick="myFunction" | ||
> | ||
</pretty-button> | ||
<pretty-button | ||
value="Link" | ||
type="link" | ||
onclick="myFunction" | ||
> | ||
</pretty-button> | ||
<div class="props"> | ||
<h4> Attributes </h4> | ||
<div> | ||
<h5> Type </h5> | ||
<div> primary </div> | ||
<div> danger </div> | ||
<div> default </div> | ||
<div> dashed </div> | ||
<div> link </div> | ||
</div> | ||
<div> | ||
<h5> onclick </h5> | ||
<div> myFunction </div> | ||
<p> Callback function will be trigger on click </p> | ||
</div> | ||
<div> | ||
<h5> value </h5> | ||
<div> buttonName </div> | ||
<p> value that would be display in the button </p> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript" src="main.js"></script></body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.