Skip to content

Commit

Permalink
Merge pull request #59 from mermaid-js/refactor/use-icon-component-in…
Browse files Browse the repository at this point in the history
…stead-of-svg-codes-part-1

refactor: use icon component instead of svg code (part-1)
  • Loading branch information
MrCoder authored Sep 19, 2023
2 parents b061a23 + 5ba7f4f commit ec1b266
Show file tree
Hide file tree
Showing 22 changed files with 289 additions and 124 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"typescript": "^4.7.4",
"vite": "^3.2.3",
"vite-plugin-css-injected-by-js": "^2.2.0",
"vite-svg-loader": "^4.0.0",
"vitest": "^0.26.1"
},
"eslintConfig": {
Expand Down
150 changes: 128 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 4 additions & 14 deletions src/components/DiagramFrame/Debug/Debug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,21 @@
<div
class="ml-4 text-xs inline-flex items-center font-bold leading-sm px-3 py-1 bg-green-200 text-green-700 rounded-sm"
>
<svg
class="h-4 w-4"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<line x1="6" y1="3" x2="6" y2="15"></line>
<circle cx="18" cy="6" r="3"></circle>
<circle cx="6" cy="18" r="3"></circle>
<path d="M18 9a9 9 0 0 1-9 9"></path>
</svg>
<Icon name="debug" icon-class="h-4 w-4" />
<span class="inline-block px-2">{{ gitBranch }}:{{ commitHash }}</span>
</div>
</div>
</div>
</template>

<script>
import Icon from "@/components/Icon/Icon.vue";
const commitHash = 'process.env.VUE_APP_GIT_HASH';
const gitBranch = 'process.env.VUE_APP_GIT_BRANCH';
export default {
name: 'Debug',
components: {Icon},
data() {
return {
commitHash,
Expand Down
Loading

0 comments on commit ec1b266

Please sign in to comment.