Git Product home page Git Product logo

styleguide-visual-helpers's Introduction

Bumble Styleguide Visual Helpers

Available tools

Work in progress: This is a list of visual components, which can help with most regular test-cases.

It is a React UI based list of components with zero dependencies (build based on consumer setup) for visual regression tests.

For easier work with different devices / media-queries we introduced several components:

  • StyleguidePlaceholder returns mockup of component with provided parameters
  • StyleguideCell returns component and its legend
  • StyleguideDeviceFrame returns one of predefined frames, based on mobile device aspect-ratio
  • StyleguideDeviceGroup returns set of predefined frames, based on mobile device aspect-ratio
  • getImageUrl returns static image mockup src with provided parameters - as inlined image or as image from placeholder.com
  • noop method for adding mock functions in props.
import { getImageUrl } from "@bumble/styleguide-visual-helpers";

How to define fonts-sizes for placeholders / legends for all tools

Now we can setup consistent font-sizes via config

this is example of how to setup these settings in config:

module.exports = {
    // part of config
    legendFontSize: 25,

    placeholderFontSize: 30,
};

If you would prefer to setup individualy font-sizes - you can do it for each instance of component.

How to deploy new version?

There are 3 simple steps to follow:

  • yarn build or npm run build
  • add new version to package.json file
  • npm publish

styleguide-visual-helpers's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.