fix
This commit is contained in:
parent
3e4cc32e51
commit
54f76a767f
|
|
@ -6,18 +6,23 @@
|
||||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||||
/* eslint-disable import/no-default-export */
|
/* eslint-disable import/no-default-export */
|
||||||
import type { StoryObj } from '@storybook/vue3';
|
import type { StoryObj } from '@storybook/vue3';
|
||||||
import MkCode from './MkCode.vue';
|
import MkCodeDiff from './MkCodeDiff.vue';
|
||||||
const code = `for (let i, 100) {
|
const code = `for (let i, 100) {
|
||||||
<: if (i % 15 == 0) "FizzBuzz"
|
<: if (i % 15 == 0) "FizzBuzz"
|
||||||
elif (i % 3 == 0) "Fizz"
|
elif (i % 3 == 0) "Fizz"
|
||||||
elif (i % 5 == 0) "Buzz"
|
elif (i % 5 == 0) "Buzz"
|
||||||
else i
|
else i
|
||||||
}`;
|
}`;
|
||||||
|
const diffBase = `for (let i, 100) {
|
||||||
|
<: if (i % 3 == 0) "Fizz"
|
||||||
|
elif (i % 5 == 0) "Buzz"
|
||||||
|
else i
|
||||||
|
}`;
|
||||||
export const Default = {
|
export const Default = {
|
||||||
render(args) {
|
render(args) {
|
||||||
return {
|
return {
|
||||||
components: {
|
components: {
|
||||||
MkCode,
|
MkCodeDiff,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -31,11 +36,12 @@ export const Default = {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
template: '<MkCode v-bind="props" />',
|
template: '<MkCodeDiff v-bind="props" />',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
args: {
|
args: {
|
||||||
code,
|
code,
|
||||||
|
diffBase,
|
||||||
lang: 'is',
|
lang: 'is',
|
||||||
},
|
},
|
||||||
parameters: {
|
parameters: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue