Skip to content

Commit 3bb75aa

Browse files
pkp/pkp-lib#9527 Adjust size for modal to be screenshoted
1 parent b2fb555 commit 3bb75aa

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.storybook/modes.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export const allModes = {
22
desktop: {
33
viewport: 'large',
44
},
5+
// for snapshotting scrollable areas with all content, like modals
56
desktopLargeHeight: {
67
viewport: 'largeHeight',
78
},

src/components/Modal/Modal.stories.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import FormMock from '@/docs/components/Form/helpers/form-announcement';
66
import List from '@/components/List/List.vue';
77
import ListItem from '@/components/List/ListItem.vue';
88
import {allModes} from '../../../.storybook/modes.js';
9-
//import './Modal.stories.less';
109

1110
export default {
1211
title: 'Components/Modal',
@@ -37,8 +36,7 @@ export const Base = {
3736
}),
3837
decorators: [
3938
() => ({
40-
template:
41-
'<div style="height: 150px;background-color:red"><story/></div>',
39+
template: '<div style="height: 150px"><story/></div>',
4240
}),
4341
],
4442

@@ -75,13 +73,13 @@ export const WithForm = {
7573
}),
7674
decorators: [
7775
() => ({
78-
template:
79-
'<div style="height: 1500px;background-color:red"><story/></div>',
76+
template: '<div style="height: 1500px"><story/></div>',
8077
}),
8178
],
8279
parameters: {
8380
chromatic: {
8481
modes: {
82+
desktop: {disable: true},
8583
desktopLargeHeight: allModes['desktopLargeHeight'],
8684
},
8785
},
@@ -139,8 +137,7 @@ export const WithTabs = {
139137
}),
140138
decorators: [
141139
() => ({
142-
template:
143-
'<div style="height: 500px;background-color:red"><story/></div>',
140+
template: '<div style="height: 500px"><story/></div>',
144141
}),
145142
],
146143

@@ -212,8 +209,7 @@ export const WithActions = {
212209
}),
213210
decorators: [
214211
() => ({
215-
template:
216-
'<div style="height: 300px;background-color:red"><story/></div>',
212+
template: '<div style="height: 300px"><story/></div>',
217213
}),
218214
],
219215

src/components/Modal/Modal.stories.less

-3
This file was deleted.

0 commit comments

Comments
 (0)