Skip to content

Commit

Permalink
Add imports in source codes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmzi committed Oct 19, 2021
1 parent ccb5981 commit 15c64c2
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 19 deletions.
35 changes: 30 additions & 5 deletions stories/EMDatePicker.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ Persian.parameters = {
docs: {
source: {
code: `
<EMDatePicker />
<script setup>
import { EMDatePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePicker />
</template>
`,
},
},
Expand All @@ -111,7 +116,12 @@ English.parameters = {
docs: {
source: {
code: `
<EMDatePicker lang="en" />
<script setup>
import { EMDatePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePicker lang="en" />
</template>
`,
},
},
Expand All @@ -125,7 +135,12 @@ Miladi.parameters = {
docs: {
source: {
code: `
<EMDatePicker type="miladi" />
<script setup>
import { EMDatePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePicker type="miladi" />
</template>
`,
},
},
Expand All @@ -139,7 +154,12 @@ Shamsi.parameters = {
docs: {
source: {
code: `
<EMDatePicker type="shamsi" />
<script setup>
import { EMDatePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePicker type="shamsi" />
</template>
`,
},
},
Expand All @@ -153,7 +173,12 @@ OnlyEvenDaysAllowed.parameters = {
docs: {
source: {
code: `
<EMDatePicker :allowedDates="(date) => date.getDate() % 2 === 0" />
<script setup>
import { EMDatePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePicker :allowedDates="(date) => date.getDate() % 2 === 0" />
</template>
`,
},
},
Expand Down
35 changes: 30 additions & 5 deletions stories/EMDatePickerInput.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ Persian.parameters = {
docs: {
source: {
code: `
<EMDatePickerInput />
<script setup>
import { EMDatePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePickerInput />
</template>
`,
},
},
Expand All @@ -56,7 +61,12 @@ English.parameters = {
docs: {
source: {
code: `
<EMDatePickerInput lang="en" />
<script setup>
import { EMDatePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePickerInput lang="en" />
</template>
`,
},
},
Expand All @@ -70,7 +80,12 @@ Miladi.parameters = {
docs: {
source: {
code: `
<EMDatePickerInput type="miladi" />
<script setup>
import { EMDatePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePickerInput type="miladi" />
</template>
`,
},
},
Expand All @@ -84,7 +99,12 @@ Shamsi.parameters = {
docs: {
source: {
code: `
<EMDatePickerInput type="shamsi" />
<script setup>
import { EMDatePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePickerInput type="shamsi" />
</template>
`,
},
},
Expand All @@ -98,7 +118,12 @@ OnlyEvenDaysAllowed.parameters = {
docs: {
source: {
code: `
<EMDatePickerInput :allowedDates="(date) => date.getDate() % 2 === 0" />
<script setup>
import { EMDatePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMDatePickerInput :allowedDates="(date) => date.getDate() % 2 === 0" />
</template>
`,
},
},
Expand Down
30 changes: 26 additions & 4 deletions stories/EMRangePicker.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ Persian.parameters = {
docs: {
source: {
code: `
<EMRangePicker />
<script setup>
import { EMRangePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePicker />
</template>
`,
},
},
Expand Down Expand Up @@ -146,7 +151,12 @@ Miladi.parameters = {
docs: {
source: {
code: `
<EMRangePicker type="miladi" />
<script setup>
import { EMRangePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePicker type="miladi" />
</template>
`,
},
},
Expand All @@ -160,7 +170,12 @@ Shamsi.parameters = {
docs: {
source: {
code: `
<EMRangePicker type="shamsi" />
<script setup>
import { EMRangePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePicker type="shamsi" />
</template>
`,
},
},
Expand All @@ -183,6 +198,8 @@ WithCommonDates.parameters = {
source: {
code: `
<script setup>
import { EMRangePicker } from '@cafebazaar/emrooz';
const lastWeek = new Date();
lastWeek.setDate(lastWeek.getDate() - 7);
</script>
Expand All @@ -208,7 +225,12 @@ OnlyEvenDaysAllowed.parameters = {
docs: {
source: {
code: `
<EMRangePicker :allowedDates="(date) => date.getDay() % 2 === 0" />
<script setup>
import { EMRangePicker } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePicker :allowedDates="(date) => date.getDay() % 2 === 0" />
</template>
`,
},
},
Expand Down
37 changes: 32 additions & 5 deletions stories/EMRangePickerInput.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ Persian.parameters = {
docs: {
source: {
code: `
<EMRangePickerInput />
<script setup>
import { EMRangePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePickerInput />
</template>
`,
},
},
Expand All @@ -57,7 +62,12 @@ English.parameters = {
docs: {
source: {
code: `
<EMRangePickerInput lang="en" />
<script setup>
import { EMRangePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePickerInput lang="en" />
</template>
`,
},
},
Expand All @@ -71,7 +81,12 @@ Miladi.parameters = {
docs: {
source: {
code: `
<EMRangePickerInput type="miladi" />
<script setup>
import { EMRangePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePickerInput type="miladi" />
</template>
`,
},
},
Expand All @@ -85,7 +100,12 @@ Shamsi.parameters = {
docs: {
source: {
code: `
<EMRangePickerInput type="shamsi" />
<script setup>
import { EMRangePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePickerInput type="shamsi" />
</template>
`,
},
},
Expand All @@ -108,6 +128,8 @@ WithCommonDates.parameters = {
source: {
code: `
<script setup>
import { EMRangePickerInput } from '@cafebazaar/emrooz';
const lastWeek = new Date();
lastWeek.setDate(lastWeek.getDate() - 7);
</script>
Expand All @@ -133,7 +155,12 @@ OnlyEvenDaysAllowed.parameters = {
docs: {
source: {
code: `
<EMRangePickerInput :allowedDates="(date) => date.getDay() % 2 === 0" />
<script setup>
import { EMRangePickerInput } from '@cafebazaar/emrooz';
</script>
<template>
<EMRangePickerInput :allowedDates="(date) => date.getDay() % 2 === 0" />
</template>
`,
},
},
Expand Down

0 comments on commit 15c64c2

Please sign in to comment.