Skip to content

Commit

Permalink
Merge pull request #409 from danskernesdigitalebibliotek/allow-padded…
Browse files Browse the repository at this point in the history
…-layout

Padded layout in Storybook
  • Loading branch information
JacobArrow authored Dec 29, 2023
2 parents f465f0e + c4a80c4 commit 8a5d3d0
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const parameters = {
layout: "fullscreen",
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
Expand All @@ -13,6 +14,6 @@ export const parameters = {
// Set the viewport widths that Chromatic tests with globally.
// 400 lies between our screen-xs & screen-s variables.
// 1200 is the chromatic viewport we were using as default before adding an extra one for phones.
viewports: [400, 1200]
viewports: [400, 1200],
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?node-id=656%3A5407",
},
layout: "centered",
},
argTypes: {
fill: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import ButtonExpand, { ButtonExpandProps } from "./ButtonExpand";
export default {
title: "Library / Buttons / Button Expand",
component: ButtonExpand,
parameters: {},
parameters: {
layout: "centered",
},
argTypes: {
showMore: {
control: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=607%3A35282",
},
layout: "centered",
},
argTypes: {
isChecked: {
Expand Down
4 changes: 3 additions & 1 deletion src/stories/Library/Forms/checkbox/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export default {
},
},
},
parameters: {},
parameters: {
layout: "centered",
},
} as ComponentMeta<typeof Checkbox>;

const Template: ComponentStory<typeof Checkbox> = (args) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?type=design&node-id=7605%3A54868&mode=design&t=MoXpQuI4TAXRxRDe-1",
},
layout: "fullscreen",
layout: "padded",
},
} as ComponentMeta<typeof DatePicker>;

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Library/Forms/input/Input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=1239%3A66174",
},
layout: "fullscreen",
layout: "padded",
},
} as ComponentMeta<typeof Input>;

Expand Down
1 change: 1 addition & 0 deletions src/stories/Library/accordion/Accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?node-id=1357%3A9754",
},
layout: "padded",
},
argTypes: {
list: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?type=design&node-id=7605%3A54868&mode=design&t=MoXpQuI4TAXRxRDe-1",
},
layout: "fullscreen",
layout: "padded",
},
} as ComponentMeta<typeof DateCalendar>;

Expand Down
1 change: 1 addition & 0 deletions src/stories/Library/dropdown/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?node-id=274%3A6642",
},
layout: "padded",
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Library/progress-bar/progressBar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=1239%3A66855",
},
layout: "fullscreen",
layout: "padded",
},
argTypes: {
amount: {
Expand Down
4 changes: 3 additions & 1 deletion src/stories/Library/status-label/StatusLabel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export default {
component: StatusLabel,
decorators: [withDesign],
argTypes: {},
parameters: {},
parameters: {
layout: "centered",
},
} as ComponentMeta<typeof StatusLabel>;

const Template: ComponentStory<typeof StatusLabel> = (args) => (
Expand Down
1 change: 1 addition & 0 deletions src/stories/Library/typography/Typography.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default {
type: "figma",
url: "https://www.figma.com/file/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?node-id=2%3A476",
},
layout: "padded",
},
} as Meta;

Expand Down
8 changes: 0 additions & 8 deletions src/styles/scss/internal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,6 @@ code {
background-color: #f5f8fa;
}

.sb-main-padded {
padding: 0 !important;
}

.sb-show-main {
padding: 0 !important;
}

// Shadows
.shadow-box-container {
display: flex;
Expand Down

0 comments on commit 8a5d3d0

Please sign in to comment.