Skip to content

layout in preview.js doesn't work #288

Open

Description

I have very simple preview.js config

import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds';

export const decorators = [withBackgrounds];
export const parameters = {
  layout: 'centered',
  backgrounds: [
    { name: 'plain', value: 'white', default: true },
    { name: 'warm', value: 'hotpink' },
    { name: 'cool', value: 'deepskyblue' }
  ]
};

but components are not centered.

Expected behavior
Components should be centered.

Screenshots
Screenshot_2021-10-16-17-39-53-412_com reactnativeui

System:
Environment Info:

System:
OS: Linux 5.14 Fedora 34 (Workstation Edition) 34 (Workstation Edition)
CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
Binaries:
Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
Yarn: 1.19.0 - ~/.nvm/versions/node/v16.10.0/bin/yarn
npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
Browsers:
Chrome: 94.0.4606.81
Firefox: 93.0
npmPackages:
@storybook/react-native: ^6.0.1-alpha.6 => 6.0.1-alpha.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions