Skip to content

Commit 8d8aee7

Browse files
💄 style: Fix Cursor icon
1 parent 256c669 commit 8d8aee7

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env sh
22

3+
npm run build:toc
34
git add .
45
npm run type-check
56
npx --no-install lint-staged

packages/static-png/dark/cursor.png

16.1 KB
Loading

packages/static-svg/icons/cursor.svg

Lines changed: 1 addition & 1 deletion
Loading
40.2 KB
Binary file not shown.

scripts/svgWorkflow/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const themeColors = {
2222
};
2323

2424
class SvgWorkflow {
25-
ignoreList = ['dify.svg', 'dify-color.svg'];
25+
ignoreList = ['cursor.svg', 'dify.svg', 'dify-color.svg'];
2626

2727
exportSvg(Component: ComponentType, outputFileName: string): void {
2828
const svgString = renderToStaticMarkup(createElement(Component));

src/components/Dashboard/IconItem.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const IconItem = memo<IconItemProps>(({ children, title, color, id }) => {
8787
const url = URL.createObjectURL(blob);
8888
const downloadLink = document.createElement('a');
8989
downloadLink.href = url;
90-
downloadLink.download = 'icon.svg';
90+
downloadLink.download = `${id.toLowerCase()}.svg`;
9191
document.body.append(downloadLink);
9292
downloadLink.click();
9393
downloadLink.remove();
@@ -132,9 +132,14 @@ const IconItem = memo<IconItemProps>(({ children, title, color, id }) => {
132132
</Center>
133133
<Flexbox flex={1} horizontal paddingInline={12}>
134134
<Center flex={1} height={32}>
135-
<Link style={{ color: 'inherit' }} to={`/components/${customKebabCase(id)}`}>
135+
<a
136+
href={`https://lobehub.com/icons/${customKebabCase(id)}`}
137+
rel="noreferrer"
138+
style={{ color: 'inherit' }}
139+
target={'_blank'}
140+
>
136141
<ActionIcon icon={SearchIcon} size={'small'} />
137-
</Link>
142+
</a>
138143
</Center>
139144
<Center flex={1} height={32} onClick={handleDownload}>
140145
<ActionIcon icon={DownloadIcon} size={'small'} />

0 commit comments

Comments
 (0)