@artsy/palette-mobile 13.2.6 → 13.2.7

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.
@@ -5,5 +5,5 @@ type FollowButtonProps = Omit<ButtonProps, "variant" | "size" | "longestText" |
5
5
  followCount?: number;
6
6
  longestText?: string;
7
7
  };
8
- export declare const FollowButton: ({ isFollowed, followCount, longestText, ...restProps }: FollowButtonProps) => JSX.Element;
8
+ export declare const FollowButton: ({ isFollowed, followCount, longestText, loading, ...restProps }: FollowButtonProps) => JSX.Element;
9
9
  export {};
@@ -6,7 +6,7 @@ const CheckIcon_1 = require("../../svgs/CheckIcon");
6
6
  const formatLargeNumber_1 = require("../../utils/formatLargeNumber");
7
7
  const Button_1 = require("../Button");
8
8
  const Text_1 = require("../Text");
9
- const FollowButton = ({ isFollowed, followCount, longestText, ...restProps }) => {
10
- return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "black60", width: "16px", height: "16px" }), ...restProps, children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", children: isFollowed ? "Following" : "Follow" }), !!followCount && followCount > 1 && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: "black60", children: " " + (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) }) }))] }));
9
+ const FollowButton = ({ isFollowed, followCount, longestText, loading, ...restProps }) => {
10
+ return ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && !loading && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "black60", width: "16px", height: "16px" }), loading: loading, ...restProps, children: !loading && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", children: isFollowed ? "Following" : "Follow" }), !!followCount && followCount > 1 && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: "black60", children: " " + (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) }) }))] })) }));
11
11
  };
12
12
  exports.FollowButton = FollowButton;
@@ -5,5 +5,5 @@ type FollowButtonProps = Omit<ButtonProps, "variant" | "size" | "longestText" |
5
5
  followCount?: number;
6
6
  longestText?: string;
7
7
  };
8
- export declare const FollowButton: ({ isFollowed, followCount, longestText, ...restProps }: FollowButtonProps) => JSX.Element;
8
+ export declare const FollowButton: ({ isFollowed, followCount, longestText, loading, ...restProps }: FollowButtonProps) => JSX.Element;
9
9
  export {};
@@ -6,7 +6,7 @@ const CheckIcon_1 = require("../../svgs/CheckIcon");
6
6
  const formatLargeNumber_1 = require("../../utils/formatLargeNumber");
7
7
  const Button_1 = require("../Button");
8
8
  const Text_1 = require("../Text");
9
- const FollowButton = ({ isFollowed, followCount, longestText, ...restProps }) => {
10
- return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "black60", width: "16px", height: "16px" }), ...restProps, children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", children: isFollowed ? "Following" : "Follow" }), !!followCount && followCount > 1 && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: "black60", children: " " + (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) }) }))] }));
9
+ const FollowButton = ({ isFollowed, followCount, longestText, loading, ...restProps }) => {
10
+ return ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && !loading && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "black60", width: "16px", height: "16px" }), loading: loading, ...restProps, children: !loading && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", children: isFollowed ? "Following" : "Follow" }), !!followCount && followCount > 1 && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: "black60", children: " " + (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) }) }))] })) }));
11
11
  };
12
12
  exports.FollowButton = FollowButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.2.6",
3
+ "version": "13.2.7",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "RCT_METRO_PORT=8082 react-native run-android --port 8082",