tgui-core 4.3.1 → 4.3.2
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.
|
@@ -12,7 +12,11 @@ type Props = {
|
|
|
12
12
|
spin: BooleanLike;
|
|
13
13
|
}> & Omit<BoxProps, 'children'>;
|
|
14
14
|
export declare function Icon(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
|
|
15
|
+
type IconStackProps = {
|
|
16
|
+
/** Works same as `Icon` size prop, but for all icons inside. */
|
|
17
|
+
size?: number;
|
|
18
|
+
};
|
|
19
|
+
declare function IconStack(props: BoxProps & IconStackProps): import("react/jsx-runtime").JSX.Element;
|
|
16
20
|
/**
|
|
17
21
|
* ## Icon
|
|
18
22
|
*
|
package/dist/components/Icon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{classes as e}from"../common/react.js";import{computeBoxClassName as o,computeBoxProps as r}from"../common/ui.js";let
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{classes as e}from"../common/react.js";import{computeBoxClassName as o,computeBoxProps as r}from"../common/ui.js";let s=/-o$/;function a(a){let{name:n="",size:c,spin:i,className:f,rotation:l,...m}=a,p=m.style||{};c&&(p.fontSize=`${100*c}%`),l&&(p.transform=`rotate(${l}deg)`),m.style=p;let u=r(m),I="";if(n.startsWith("tg-"))I=n;else{let t=s.test(n),e=n.replace(s,""),o=!e.startsWith("fa-");I=t?"far ":"fas ",o&&(I+="fa-"),I+=e,i&&(I+=" fa-spin")}return t("i",{className:e(["Icon",I,f,o(m)]),...u})}(a||(a={})).Stack=function(s){let{className:a,children:n,size:c,...i}=s,f=i.style||{};return c&&(f.fontSize=`${100*c}%`),i.style=f,t("span",{className:e(["IconStack",a,o(i)]),...r(i),children:n})};export{a as Icon};
|
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
.IconStack > .Icon {
|
|
2
|
-
position: absolute;
|
|
3
|
-
width: 100%;
|
|
4
|
-
text-align: center;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
1
|
.IconStack {
|
|
8
2
|
position: relative;
|
|
9
|
-
display: inline-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
|
|
7
|
+
.Icon {
|
|
8
|
+
&:before {
|
|
9
|
+
vertical-align: middle;
|
|
10
|
+
}
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
&:not(:first-child) {
|
|
13
|
+
position: absolute;
|
|
14
|
+
}
|
|
17
15
|
}
|
|
18
16
|
}
|