Skip to content
This repository was archived by the owner on Dec 13, 2017. It is now read-only.
This repository was archived by the owner on Dec 13, 2017. It is now read-only.

Feature request: Improve background transition effect and swatch value output #38

@josefvn

Description

@josefvn

I love this Storybook addon, and I would like to make a feature request...

I'm using the background addon as follows:

storiesOf('MyComponent', module)
    .addDecorator(backgrounds([
        {
            name: 'Cape Town',
            value: 'url(cape-town.jpg) no-repeat center center',
            default: true,
        },
        { name: 'None', value: 'transparent' },
        { name: 'Light Blue', value: 'lightblue' },
        { name: 'Gray', value: 'lightgray' },
        {
            name: 'Stripey',
            value: 'repeating-linear-gradient(45deg, #606dbc, #606dbc 10px, #465298 10px, #465298 20px )',
        },
    ]))
    .add('MyComponent', () => (
        <MyComponent />
    ));

With the above, I can for set a background image, or pin stripe background image using repeating gradients as a background.

However, with the center center on background, the transition makes switching from background to background rather weird. Maybe transition should be set to background-color only, as it tries to sort of swoop into its location? Perhaps add a param to turn the transition on/off.

Another observation I have made, is that the Swatch panel shows all the CSS for the given swatch item next to the name, so in my example above, for the 'Stripey' background I can see the entire CSS snippet output next to the name, and due to it wrapping, it looks rather ugly.

Take a peek at the attached image.

screen shot 2017-08-28 at 4 49 38 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions