@aristobyte-ui/anchor 2.6.1 → 2.8.0

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.
@@ -0,0 +1,94 @@
1
+ @use '@aristobyte-ui/utils/styles' as *;
2
+
3
+ .anchor {
4
+ background-color: $transparent;
5
+ border: none;
6
+ cursor: pointer;
7
+ display: flex;
8
+ font-size: 0.875rem;
9
+ font-weight: 500;
10
+ letter-spacing: 0rem;
11
+ line-height: 1.4285714286;
12
+ overflow: hidden;
13
+ position: relative;
14
+ padding: 0.5rem 1rem;
15
+ transition: all 200ms ease;
16
+
17
+ &:hover {
18
+ text-decoration: underline;
19
+ }
20
+
21
+ &:active {
22
+ transform: scale(0.97);
23
+ }
24
+
25
+ &--white {
26
+ color: $white;
27
+
28
+ &:hover {
29
+ color: $white-hover;
30
+ }
31
+ }
32
+
33
+ &--black {
34
+ color: $black;
35
+
36
+ &:hover {
37
+ color: $black-hover;
38
+ }
39
+ }
40
+
41
+ &--default {
42
+ color: $color-default;
43
+
44
+ &:hover {
45
+ color: $color-default-hover;
46
+ }
47
+ }
48
+
49
+ &--primary {
50
+ color: $color-primary;
51
+
52
+ &:hover {
53
+ color: $color-primary-hover;
54
+ }
55
+ }
56
+
57
+ &--secondary {
58
+ color: $color-secondary;
59
+
60
+ &:hover {
61
+ color: $color-secondary-hover;
62
+ }
63
+ }
64
+
65
+ &--success {
66
+ color: $color-success;
67
+
68
+ &:hover {
69
+ color: $color-success-hover;
70
+ }
71
+ }
72
+
73
+ &--error {
74
+ color: $color-error;
75
+
76
+ &:hover {
77
+ color: $color-error-hover;
78
+ }
79
+ }
80
+
81
+ &--warning {
82
+ color: $color-warning;
83
+ color: $black;
84
+
85
+ &:hover {
86
+ color: $color-warning-hover;
87
+ }
88
+ }
89
+
90
+ svg {
91
+ height: 100%;
92
+ width: 100%;
93
+ }
94
+ }
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import './Anchor.scss';
3
+ export interface IAnchor {
4
+ href?: string;
5
+ target?: '_self' | '_blank' | '_parent' | '_top';
6
+ text?: string;
7
+ children?: React.ReactElement | React.ReactNode | string;
8
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | Promise<void>;
9
+ variant?: 'white' | 'black' | 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning';
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ }
13
+ export declare const Anchor: React.FC<IAnchor>;
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import './Anchor.scss';
4
+ export var Anchor = function (_a) {
5
+ var _b = _a.href, href = _b === void 0 ? '' : _b, _c = _a.target, target = _c === void 0 ? '_self' : _c, _d = _a.variant, variant = _d === void 0 ? 'default' : _d, _e = _a.children, children = _e === void 0 ? '' : _e, _f = _a.text, text = _f === void 0 ? '' : _f, onClick = _a.onClick, _g = _a.className, className = _g === void 0 ? '' : _g, _h = _a.style, style = _h === void 0 ? {} : _h;
6
+ var ref = React.useRef(null);
7
+ var renderChildren = function () {
8
+ return text || children;
9
+ };
10
+ return (React.createElement("a", { ref: ref, href: href, target: target, className: "anchor ".concat("anchor--".concat(variant), " ").concat(className), onClick: onClick, style: style }, renderChildren()));
11
+ };
@@ -0,0 +1 @@
1
+ export * from "./Anchor";
@@ -0,0 +1 @@
1
+ export * from "./Anchor";
package/es/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './components';
package/es/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './components';