Skip to content

Commit

Permalink
docs: update svg (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Feb 22, 2024
1 parent e322b06 commit 1367a1e
Show file tree
Hide file tree
Showing 4 changed files with 2,334 additions and 2,387 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

package-lock.json
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"repository": "https://github.com/ant-design/antd-issue-helper.git"
}
10 changes: 6 additions & 4 deletions src/createPreview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default function createPreview(issueType: string, values: any) {
if (issueType === "bug") {
if (issueType === 'bug') {
return createBugPreview(values);
}
return createFeaturePreview(values);
Expand All @@ -15,7 +15,7 @@ function createBugPreview({
expected,
actual,
extra,
repo
repo,
}: any) {
return `
### Reproduction link
Expand All @@ -41,7 +41,7 @@ ${actual}
| System | ${system} |
| Browser | ${browser} |
${extra ? `---\n${extra}` : ""}
${extra ? `---\n${extra}` : ''}
`.trim();
}

Expand All @@ -63,8 +63,10 @@ function createReproductionLink(link: string) {
return;
}

if (link.indexOf("codesandbox.io") >= 0) {
if (link.indexOf('codesandbox.io') >= 0) {
return `[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](${link})`;
} else if (link.indexOf('stackblitz.com') >= 0) {
return `[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](${link})`;
}

return `[${link}](${link})`;
Expand Down
Loading

0 comments on commit 1367a1e

Please sign in to comment.