Skip to content

Commit fcf07dd

Browse files
authored
Merge pull request #2001 from teableio/fix/button-click-icon
fix: button click icon and update status logic
2 parents 3068fa4 + aa6aca6 commit fcf07dd

File tree

4 files changed

+53
-3
lines changed

4 files changed

+53
-3
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import * as React from 'react';
2+
import type { SVGProps } from 'react';
3+
const MousePointerClick = (props: SVGProps<SVGSVGElement>) => (
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
width="1em"
7+
height="1em"
8+
fill="none"
9+
viewBox="0 0 24 24"
10+
{...props}
11+
>
12+
<path
13+
stroke="currentColor"
14+
strokeLinecap="round"
15+
strokeLinejoin="round"
16+
strokeWidth={2}
17+
d="M14 4.1 12 6"
18+
/>
19+
<path
20+
stroke="currentColor"
21+
strokeLinecap="round"
22+
strokeLinejoin="round"
23+
strokeWidth={2}
24+
d="m5.1 8-2.9-.8"
25+
/>
26+
<path
27+
stroke="currentColor"
28+
strokeLinecap="round"
29+
strokeLinejoin="round"
30+
strokeWidth={2}
31+
d="m6 12-1.9 2"
32+
/>
33+
<path
34+
stroke="currentColor"
35+
strokeLinecap="round"
36+
strokeLinejoin="round"
37+
strokeWidth={2}
38+
d="M7.2 2.2 8 5.1"
39+
/>
40+
<path
41+
stroke="currentColor"
42+
strokeLinecap="round"
43+
strokeLinejoin="round"
44+
strokeWidth={2}
45+
d="M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z"
46+
/>
47+
</svg>
48+
);
49+
export default MousePointerClick;

packages/icons/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,4 @@ export { default as ZoomOut } from './components/ZoomOut';
176176
export { default as AmazonBedrock } from './components/AmazonBedrock';
177177
export { default as TeableAi } from './components/TeableAi';
178178
export { default as Compose } from './components/Compose';
179+
export { default as MousePointerClick } from './components/MousePointerClick';

packages/sdk/src/hooks/use-button-click-status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const useButtonClickStatus = (tableId: string, shareId?: string) => {
3939
runId: res.data.runId,
4040
recordId: ro.recordId,
4141
fieldId: ro.fieldId,
42-
loading: true,
42+
loading: !!res.data.runId,
4343
name: ro.name,
4444
});
4545
},

packages/sdk/src/hooks/use-field-static-getter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import {
2626
UserEdit as LastModifiedByIcon,
2727
EyeOff,
2828
MagicAi,
29+
MousePointerClick as MousePointerClickIcon,
2930
} from '@teable/icons';
3031

31-
import { MousePointerClick } from 'lucide-react';
3232
import { useCallback } from 'react';
3333
import { useTranslation } from '../context/app/i18n';
3434
import {
@@ -225,7 +225,7 @@ export const useFieldStaticGetter = () => {
225225
label: t('common.click'),
226226
color: Colors.Teal,
227227
},
228-
Icon: getIcon(MousePointerClick),
228+
Icon: getIcon(MousePointerClickIcon),
229229
};
230230
default:
231231
throw new Error(`field type: ${type} has not define statics`);

0 commit comments

Comments
 (0)