pipesol-button 1.0.1-beta.16 → 1.0.1-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,7 @@ const ButtonStyled = styled('a', {
|
|
|
15
15
|
'margin',
|
|
16
16
|
'boxShadow',
|
|
17
17
|
].includes(prop),
|
|
18
|
-
})(({ theme, kind
|
|
18
|
+
})(({ theme, kind, backgroundColor, backgroundColorHover, colorText, colorHover, padding, borderRadius, border, width, margin, boxShadow, }) => {
|
|
19
19
|
const tokens = kind === "primary"
|
|
20
20
|
? theme.palette.custom.primaryButton
|
|
21
21
|
: (kind === "secondary" ? theme.palette.custom.secondaryButton : undefined);
|
|
@@ -46,15 +46,15 @@ const ButtonStyled = styled('a', {
|
|
|
46
46
|
* Cria um link estilizado que pode ser usado para redirecionar
|
|
47
47
|
* para páginas externas ou seções internas.
|
|
48
48
|
*/
|
|
49
|
-
const NavigationButton = ({ url, aria_label, backgroundColor, backgroundColorHover, color, colorHover, borderRadius = '0', border = 'none', boxShadow = 'none', width, margin = '0', padding = '8px 24px', children, }) => {
|
|
49
|
+
const NavigationButton = ({ url, kind = "none", aria_label, backgroundColor, backgroundColorHover, color, colorHover, borderRadius = '0', border = 'none', boxShadow = 'none', width, margin = '0', padding = '8px 24px', children, }) => {
|
|
50
50
|
const marginButton = margin;
|
|
51
51
|
if (url.indexOf('http') !== -1) {
|
|
52
52
|
// Link externo: abre em nova aba
|
|
53
|
-
return (_jsx(ButtonStyled, { href: url, width: width, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, color: color, colorHover: colorHover, borderRadius: borderRadius, border: border, padding: padding, margin: marginButton, "aria-label": aria_label, target: "_blank", boxShadow: boxShadow, rel: "noopener noreferrer", children: children }));
|
|
53
|
+
return (_jsx(ButtonStyled, { kind: kind, href: url, width: width, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, color: color, colorHover: colorHover, borderRadius: borderRadius, border: border, padding: padding, margin: marginButton, "aria-label": aria_label, target: "_blank", boxShadow: boxShadow, rel: "noopener noreferrer", children: children }));
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
// Link interno ou âncora
|
|
57
|
-
return (_jsx(ButtonStyled, { href: url, width: width, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, color: color, colorHover: colorHover, borderRadius: borderRadius, border: border, padding: padding, margin: marginButton, "aria-label": aria_label, boxShadow: boxShadow, children: children }));
|
|
57
|
+
return (_jsx(ButtonStyled, { kind: kind, href: url, width: width, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, color: color, colorHover: colorHover, borderRadius: borderRadius, border: border, padding: padding, margin: marginButton, "aria-label": aria_label, boxShadow: boxShadow, children: children }));
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
export default NavigationButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationButton.js","sourceRoot":"","sources":["../../src/components/NavigationButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,CAAC;QACC,MAAM;QACN,iBAAiB;QACjB,sBAAsB;QACtB,WAAW;QACX,YAAY;QACZ,SAAS;QACT,cAAc;QACd,QAAQ;QACR,OAAO;QACP,QAAQ;QACR,WAAW;KACZ,CAAC,QAAQ,CAAC,IAAc,CAAC;CAC7B,CAAC,CAaA,CAAC,EACC,KAAK,
|
|
1
|
+
{"version":3,"file":"NavigationButton.js","sourceRoot":"","sources":["../../src/components/NavigationButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,EAAE;IAC/B,iBAAiB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