treebohotels/leaf-ui

Center and add space around stories in Storybook

Closed this issue · 2 comments

Feature

What is the current behavior?

Stories in Storybook are rendered starting from the default position (top left corner of the screen).

What is the expected behavior?

It would be more visually appealing experience as well as give more context for components with drop shadows for example, if stories were centred and had some spacing on all sides.

What can be the possible solution?

Add a Storybook decorator! I've already done this. Here's some screenshots of what the Storybook looks like this added:

screen shot 2018-05-03 at 5 10 42 pm

screen shot 2018-05-03 at 5 10 57 pm

screen shot 2018-05-03 at 5 11 05 pm

screen shot 2018-05-03 at 5 11 17 pm

screen shot 2018-05-03 at 5 11 28 pm

screen shot 2018-05-03 at 5 11 34 pm

screen shot 2018-05-03 at 5 11 42 pm

screen shot 2018-05-03 at 5 11 49 pm

Pretty nice right? I've opened a PR for this here. This is only for web and amp for now. I tried to get React Native working as well, but I ended up getting this error even on the unmodified master branch.

screen shot 2018-05-03 at 5 51 46 pm

I'd be happy to make any changes you'd like!

Hey @tallpants, let me be the first to welcome to leaf-ui! 🎉 We love this idea actually, let's see how we can get this merged soon :)

Addressed in #66