@lobehub/icons-rn 1.0.4 → 1.0.5

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.
package/dist/index.d.mts CHANGED
@@ -59,6 +59,7 @@ declare const RNModelIcon: React__default.NamedExoticComponent<RNModelIconProps>
59
59
 
60
60
  interface RNModelTagProps {
61
61
  model: string;
62
+ size?: number;
62
63
  style?: ViewStyle;
63
64
  textStyle?: ViewStyle;
64
65
  type?: 'color' | 'mono';
package/dist/index.d.ts CHANGED
@@ -59,6 +59,7 @@ declare const RNModelIcon: React__default.NamedExoticComponent<RNModelIconProps>
59
59
 
60
60
  interface RNModelTagProps {
61
61
  model: string;
62
+ size?: number;
62
63
  style?: ViewStyle;
63
64
  textStyle?: ViewStyle;
64
65
  type?: 'color' | 'mono';
package/dist/index.js CHANGED
@@ -10753,43 +10753,50 @@ var RNModelIcon = react.memo(
10753
10753
  );
10754
10754
  RNModelIcon.displayName = "RNModelIcon";
10755
10755
  var ModelIcon_default = RNModelIcon;
10756
- var RNModelTag = react.memo((_a) => {
10757
- var _b = _a, { type = "mono", model, style, textStyle } = _b, rest = __objRest(_b, ["type", "model", "style", "textStyle"]);
10758
- return /* @__PURE__ */ jsxRuntime.jsxs(
10759
- reactNative.View,
10760
- __spreadProps(__spreadValues({
10761
- style: [
10762
- {
10763
- alignItems: "center",
10764
- backgroundColor: "#f5f5f5",
10765
- borderRadius: 12,
10766
- flexDirection: "row",
10767
- paddingHorizontal: 8,
10768
- paddingVertical: 4
10769
- },
10770
- style
10771
- ]
10772
- }, rest), {
10773
- children: [
10774
- /* @__PURE__ */ jsxRuntime.jsx(ModelIcon_default, { model, size: 12, type }),
10775
- /* @__PURE__ */ jsxRuntime.jsx(
10776
- reactNative.Text,
10756
+ var RNModelTag = react.memo(
10757
+ (_a) => {
10758
+ var _b = _a, { type = "mono", model, size = 12, style, textStyle } = _b, rest = __objRest(_b, ["type", "model", "size", "style", "textStyle"]);
10759
+ const textSize = Math.max(size * 0.9, 10);
10760
+ const paddingHorizontal = Math.max(size * 0.67, 8);
10761
+ const paddingVertical = Math.max(size * 0.33, 4);
10762
+ const borderRadius = Math.max(size, 12);
10763
+ const marginLeft = Math.max(size * 0.33, 4);
10764
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10765
+ reactNative.View,
10766
+ __spreadProps(__spreadValues({
10767
+ style: [
10777
10768
  {
10778
- style: [
10779
- {
10780
- color: "#666",
10781
- fontSize: 12,
10782
- marginLeft: 4
10783
- },
10784
- textStyle
10785
- ],
10786
- children: model
10787
- }
10788
- )
10789
- ]
10790
- })
10791
- );
10792
- });
10769
+ alignItems: "center",
10770
+ backgroundColor: "#f5f5f5",
10771
+ borderRadius,
10772
+ flexDirection: "row",
10773
+ paddingHorizontal,
10774
+ paddingVertical
10775
+ },
10776
+ style
10777
+ ]
10778
+ }, rest), {
10779
+ children: [
10780
+ /* @__PURE__ */ jsxRuntime.jsx(ModelIcon_default, { model, size, type }),
10781
+ /* @__PURE__ */ jsxRuntime.jsx(
10782
+ reactNative.Text,
10783
+ {
10784
+ style: [
10785
+ {
10786
+ color: "#666",
10787
+ fontSize: textSize,
10788
+ marginLeft
10789
+ },
10790
+ textStyle
10791
+ ],
10792
+ children: model
10793
+ }
10794
+ )
10795
+ ]
10796
+ })
10797
+ );
10798
+ }
10799
+ );
10793
10800
  RNModelTag.displayName = "RNModelTag";
10794
10801
  var ModelTag_default = RNModelTag;
10795
10802