-
Notifications
You must be signed in to change notification settings - Fork 0
/
Btnsave.jsx
63 lines (63 loc) · 1.42 KB
/
Btnsave.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import styled from "styled-components";
import { Icono } from "../../index";
export function Btnsave({
funcion,
titulo,
bgcolor,
icono,
url,
color,
disabled,width
}) {
return (
<Container $width={width}
disabled={disabled}
$color={color}
type="submit"
$bgcolor={bgcolor}
onClick={funcion}
>
<section className="content">
<Icono $color={color}>{icono}</Icono>
{titulo && (
<span className="btn">
<a href={url} target="_blank">
{titulo}
</a>
</span>
)}
</section>
</Container>
);
}
const Container = styled.button`
font-weight: 700;
display: flex;
font-size: 15px;
padding: 10px 25px;
border-radius: 16px;
background-color: ${(props) => props.$bgcolor};
border: 2px solid rgba(50, 50, 50, 0.2);
border-bottom: 5px solid rgba(50, 50, 50, 0.2);
transform: translate(0, -3px);
cursor: pointer;
transition: 0.2s;
transition-timing-function: linear;
color: rgb(${(props) => props.$color});
align-items: center;
justify-content: center;
width:${(props)=>props.$width};
.content {
display: flex;
gap: 12px;
}
&:active {
transform: translate(0, 0);
border-bottom: 2px solid rgba(50, 50, 50, 0.5);
}
&[disabled] {
background-color: #646464;
cursor: no-drop;
box-shadow: none;
}
`;