This repository was archived by the owner on Mar 27, 2025. It is now read-only.
File tree 3 files changed +68
-7
lines changed
3 files changed +68
-7
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <b-card > {{ $props }} </b-card >
2
+ <b-card >
3
+ <template #header >
4
+ <div class =" mb-2" >
5
+ <h3 >{{ component }} - {{ change }}</h3 >
6
+ </div >
7
+ <b-badge :variant =" difficultyVariant" >{{ difficulty }}</b-badge >
8
+ </template >
9
+ <div class =" mb-2" >
10
+ <h4 >Rationale:</h4 >
11
+ {{ rationale }}
12
+ </div >
13
+ <h4 >Fix:</h4 >
14
+ {{ fix }}
15
+ </b-card >
3
16
</template >
4
17
5
18
<script setup lang="ts">
6
- import {BCard } from ' bootstrap-vue-next'
19
+ import {computed } from ' vue'
20
+ import {BBadge , BCard , type ColorVariant } from ' bootstrap-vue-next'
7
21
8
- defineProps <{
9
- difficulty: ' hard' | ' normal ' | ' easy'
22
+ const props = defineProps <{
23
+ difficulty: ' hard' | ' medium ' | ' easy'
10
24
component: string
25
+ change: string
11
26
/**
12
27
* The rationale for the change
13
28
*/
14
29
rationale: string
15
30
fix: string
16
- description: string
17
31
}>()
32
+
33
+ const difficultyVariant = computed <ColorVariant >(() =>
34
+ props .difficulty === ' hard' ? ' danger' : props .difficulty === ' medium' ? ' warning' : ' success'
35
+ )
18
36
</script >
Original file line number Diff line number Diff line change 1
- # Hello World
1
+ # Migration Guide
2
+
3
+ <migration-wrapper v-for =" (item, i) in changes " :key =" i " v-bind =" item " class =" my-3 " />
4
+
5
+ <script setup lang =" ts " >
6
+ import {computed } from ' vue'
7
+ import MigrationWrapper from ' ./components/MigrationWrapper.vue'
8
+
9
+ const changes = computed< {
10
+ difficulty: ' hard' | ' medium' | ' easy'
11
+ component: string
12
+ change: string
13
+ /**
14
+ * The rationale for the change
15
+ */
16
+ rationale: string
17
+ fix: string
18
+ description: string
19
+ }[]> (() => [
20
+ {
21
+ change: ' subTitle prop renamed to subtitle' ,
22
+ fix: " Any instances of using prop 'subTitle' on BCard should be replaced with 'subtitle'" ,
23
+ component: ' BCard' ,
24
+ difficulty: ' easy' ,
25
+ rationale:
26
+ " The word 'subtitle' is a single word. CamelCase of the word 'subTitle' indicates that it would be multi word, sub & title. This is incorrect" ,
27
+ },
28
+ {
29
+ change: ' subTitleTag prop renamed to subtitleTag' ,
30
+ fix: " Any instances of using prop 'subTitleTag' on BCard should be replaced with 'subtitleTag'" ,
31
+ component: ' BCard' ,
32
+ difficulty: ' easy' ,
33
+ rationale:
34
+ " The word 'subtitle' is a single word. CamelCase of the word 'subTitle' indicates that it would be multi word, sub & title. This is incorrect" ,
35
+ },
36
+ {
37
+ change: ' subTitleTextVariant prop renamed to subtitleTextVariant' ,
38
+ fix: " Any instances of using prop 'subTitleTextVariant' on BCard should be replaced with 'subtitleTextVariant'" ,
39
+ component: ' BCard' ,
40
+ difficulty: ' easy' ,
41
+ rationale:
42
+ " The word 'subtitle' is a single word. CamelCase of the word 'subTitle' indicates that it would be multi word, sub & title. This is incorrect" ,
43
+ },
44
+ ].sort ((a , b ) => a .component .localeCompare (b .component )))
45
+ </script >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments