All Projects → rbardini → storybook-addon-paddings

rbardini / storybook-addon-paddings

Licence: MIT license
🔲 A Storybook addon to add different paddings to your preview

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to storybook-addon-paddings

spacers
🔳 when you need more __space__ for your no-code tools.
Stars: ✭ 211 (+603.33%)
Mutual labels:  padding, margin, spacing
Grid
This package has moved and renamed
Stars: ✭ 2,079 (+6830%)
Mutual labels:  padding, margin
React Native Barcode Mask
A barcode and QR scan layout for react-native applications with customizable styling
Stars: ✭ 230 (+666.67%)
Mutual labels:  style
Personal-Emotional-Stylized-Dialog
A Paper List for Personalized, Emotional, and stylized Dialog
Stars: ✭ 112 (+273.33%)
Mutual labels:  style
MixPoet
Source codes of MixPoet: Diverse Poetry Generation via Learning Controllable Mixed Latent Space (AAAI 2020)
Stars: ✭ 141 (+370%)
Mutual labels:  style
Webpack Fix Style Only Entries
Webpack plugin to solve the problem of having a style only entry (css/sass/less) generating an extra js file.
Stars: ✭ 250 (+733.33%)
Mutual labels:  style
geostyler-openlayers-parser
GeoStyler Style Parser implementation for OpenLayers styles
Stars: ✭ 26 (-13.33%)
Mutual labels:  style
Style Resources Loader
CSS processor resources loader for webpack
Stars: ✭ 214 (+613.33%)
Mutual labels:  style
SpicyTaco.AutoGrid
A magical replacement for the built in WPF Grid and StackPanel
Stars: ✭ 67 (+123.33%)
Mutual labels:  margin
YC.Marketing
提供预约、会员、订单、数据统计功能采用WPF MVVM
Stars: ✭ 30 (+0%)
Mutual labels:  style
Neural-Tile
A better tiling script for Neural-Style
Stars: ✭ 35 (+16.67%)
Mutual labels:  style
get-css-data
A micro-library for collecting stylesheet data from link and style nodes
Stars: ✭ 29 (-3.33%)
Mutual labels:  style
storybook-xstate-addon
A storybook addon to assist with writing stories that rely on xstate
Stars: ✭ 48 (+60%)
Mutual labels:  storybook-addon
madosel
Modasel is a family of responsive front-end frameworks that make it easy to design beautiful responsive websites, apps that look amazing on any device. Madosel is semantic, readable, flexible, and completely customizable.
Stars: ✭ 39 (+30%)
Mutual labels:  style
React Native Extended Stylesheet
Extended StyleSheets for React Native
Stars: ✭ 2,732 (+9006.67%)
Mutual labels:  style
sql-formatter
Polyglot SQL formatter
Stars: ✭ 28 (-6.67%)
Mutual labels:  whitespace
Axs
Stupid simple style components for React
Stars: ✭ 214 (+613.33%)
Mutual labels:  style
harmony-discord
Harmony theme for Discord
Stars: ✭ 12 (-60%)
Mutual labels:  style
node-lintspaces
A validator for checking different kinds of whitespaces in your files.
Stars: ✭ 31 (+3.33%)
Mutual labels:  whitespace
scoper
A polyfill for scoped HTML styles elements
Stars: ✭ 79 (+163.33%)
Mutual labels:  style

Storybook Paddings Addon

npm package version Build status Dependencies status

🔲 A Storybook addon to add different paddings to your preview. Useful for checking how components behave when surrounded with white space.

Demo

View demo →

Installation

npm install --save-dev storybook-addon-paddings

within .storybook/main.js:

module.exports = {
  addons: ['storybook-addon-paddings'],
};

See example for a minimal working setup.

Configuration

The paddings toolbar comes with small, medium and large options by default, but you can configure your own set of paddings via the paddings parameter.

To configure for all stories, set the paddings parameter in .storybook/preview.js:

export const parameters = {
  paddings: {
    values: [
      { name: 'Small', value: '16px' },
      { name: 'Medium', value: '32px' },
      { name: 'Large', value: '64px' },
    ],
    default: 'Medium',
  },
};

You can also configure on per-story or per-component basis using parameter inheritance:

// Button.stories.js

// Set padding options for all Button stories
export default {
  title: 'Button',
  parameters: {
    paddings: {
      values: [
        { name: 'Small', value: '16px' },
        { name: 'Medium', value: '32px' },
        { name: 'Large', value: '64px' },
      ],
      default: 'Large',
    },
  },
};

// Disable addon in Button/Large story only
export const Large = Template.bind({});
Large.parameters = {
  paddings: { disable: true },
};
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].