Skip to content

Commit 7d8a0e7

Browse files
committed
PrettyBtns Added.
1 parent 58d0e58 commit 7d8a0e7

6 files changed

+130
-2
lines changed

assets/svgs/arrow_right_dark.svg

+3
Loading

assets/svgs/arrow_right_white.svg

+3
Loading

buttons.css

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
2+
3+
.PRIMARY_FILLED_LARGE {
4+
outline: none;
5+
height: 50px;
6+
width: 140px;
7+
background: #448fff;
8+
box-shadow: 2px 3px 20px rgba(0, 0, 0, 0.25);
9+
border-radius: 10px;
10+
border: none;
11+
font-family: "Poppins", sans-serif;
12+
font-style: normal;
13+
font-weight: 500;
14+
font-size: 14px;
15+
color: #ffffff;
16+
cursor: pointer;
17+
}
18+
19+
.SECONDARY_LARGE {
20+
outline: none;
21+
height: 50px;
22+
width: 140px;
23+
background: #ffffff;
24+
border: 2px solid #e5e5e5;
25+
box-sizing: border-box;
26+
box-shadow: -1px 2px 20px rgba(0, 0, 0, 0.15);
27+
border-radius: 10px;
28+
font-family: "Poppins", sans-serif;
29+
font-weight: 500;
30+
font-size: 14px;
31+
cursor: pointer;
32+
color: rgba(0, 0, 0, 0.54);
33+
}
34+
35+
.GET_STARTED_PRIMARY {
36+
outline: none;
37+
height: 50px;
38+
width: 160px;
39+
background: #448fff;
40+
box-shadow: 2px 3px 20px rgba(0, 0, 0, 0.25);
41+
border-radius: 10px;
42+
border: none;
43+
font-family: "Poppins", sans-serif;
44+
font-style: normal;
45+
font-weight: 500;
46+
font-size: 14px;
47+
color: #ffffff;
48+
cursor: pointer;
49+
display: flex;
50+
align-items: center;
51+
justify-content: center;
52+
}
53+
54+
.ICONS {
55+
height: 14px;
56+
width: 14px;
57+
margin-left: 15px;
58+
}
59+
60+
.GET_STARTED_PRIMARY ICONS:hover {
61+
height: 14px;
62+
width: 14px;
63+
margin-left: 15px;
64+
transition: 0.6s ease-in;
65+
}

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import PrettyCard from "./pretty-card";
2+
import PrettyBtn from "./pretty-btns";
23

3-
export { PrettyCard };
4+
export { PrettyCard, PrettyBtn };

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pretty-pretty",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Attractive Web UI components.",
55
"main": "index.js",
66
"scripts": {

pretty-btns.js

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React from "react";
2+
import "./buttons.css";
3+
import ic_arrow_right_dark from "./assets/svgs/arrow_right_dark.svg";
4+
import ic_arrow_right_white from "./assets/svgs/arrow_right_white.svg";
5+
6+
const PrettyBtn = (props) => {
7+
if (props.variant) {
8+
switch (props.variant) {
9+
case "PRIMARY_FILLED_LARGE":
10+
return (
11+
<button
12+
className="PRIMARY_FILLED_LARGE"
13+
onClick={props.onClick}
14+
style={props.style}
15+
>
16+
{props.name || "Done"}
17+
</button>
18+
);
19+
break;
20+
case "SECONDARY_LARGE":
21+
return (
22+
<button
23+
className="SECONDARY_LARGE"
24+
onClick={props.onClick}
25+
style={props.style}
26+
>
27+
{props.name || "Done"}
28+
</button>
29+
);
30+
break;
31+
case "GET_STARTED_PRIMARY":
32+
return (
33+
<button
34+
className="GET_STARTED_PRIMARY"
35+
onClick={props.onClick}
36+
style={props.style}
37+
>
38+
{props.name || "Get Started"}{" "}
39+
<img src={ic_arrow_right_white} className="ICONS" />
40+
</button>
41+
);
42+
}
43+
} else {
44+
return (
45+
<button
46+
className="PRIMARY_FILLED_LARGE"
47+
onClick={props.onClick}
48+
style={props.style}
49+
>
50+
{props.name || "Done"}
51+
</button>
52+
);
53+
}
54+
};
55+
56+
export default PrettyBtn;

0 commit comments

Comments
 (0)