Skip to content

Commit

Permalink
pkp/pkp-lib#9527 Adjust size for modal to be screenshoted
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Dec 18, 2023
1 parent b2fb555 commit 3bb75aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions .storybook/modes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export const allModes = {
desktop: {
viewport: 'large',
},
// for snapshotting scrollable areas with all content, like modals
desktopLargeHeight: {
viewport: 'largeHeight',
},
Expand Down
14 changes: 5 additions & 9 deletions src/components/Modal/Modal.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import FormMock from '@/docs/components/Form/helpers/form-announcement';
import List from '@/components/List/List.vue';
import ListItem from '@/components/List/ListItem.vue';
import {allModes} from '../../../.storybook/modes.js';
//import './Modal.stories.less';

export default {
title: 'Components/Modal',
Expand Down Expand Up @@ -37,8 +36,7 @@ export const Base = {
}),
decorators: [
() => ({
template:
'<div style="height: 150px;background-color:red"><story/></div>',
template: '<div style="height: 150px"><story/></div>',
}),
],

Expand Down Expand Up @@ -75,13 +73,13 @@ export const WithForm = {
}),
decorators: [
() => ({
template:
'<div style="height: 1500px;background-color:red"><story/></div>',
template: '<div style="height: 1500px"><story/></div>',
}),
],
parameters: {
chromatic: {
modes: {
desktop: {disable: true},
desktopLargeHeight: allModes['desktopLargeHeight'],
},
},
Expand Down Expand Up @@ -139,8 +137,7 @@ export const WithTabs = {
}),
decorators: [
() => ({
template:
'<div style="height: 500px;background-color:red"><story/></div>',
template: '<div style="height: 500px"><story/></div>',
}),
],

Expand Down Expand Up @@ -212,8 +209,7 @@ export const WithActions = {
}),
decorators: [
() => ({
template:
'<div style="height: 300px;background-color:red"><story/></div>',
template: '<div style="height: 300px"><story/></div>',
}),
],

Expand Down
3 changes: 0 additions & 3 deletions src/components/Modal/Modal.stories.less

This file was deleted.

0 comments on commit 3bb75aa

Please sign in to comment.