How to use react-cosmos-playground2 - 1 common examples

To help you get started, we’ve selected a few react-cosmos-playground2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-cosmos / react-cosmos / website / src / Features / ComponentLibraryPreview.tsx View on Github external
function getShape(fixtureId: FixtureId) {
  const str = stringifyFixtureId(fixtureId);
  switch (str) {
    case 'Berries.ts-Raspberry':
      return {
        d:
          'M94.7,-91.8C115.3,-74,119.7,-37,120.3,0.5999999999999996C120.9,38.2,117.7,76.4,97,93.5C76.4,110.7,38.2,106.9,6.7,100.1C-24.7,93.4,-49.5,83.8,-70.8,66.7C-92.2,49.5,-110.1,24.7,-120,-9.9C-129.9,-44.5,-131.8,-89.1,-110.4,-106.9C-89.1,-124.8,-44.5,-115.9,-3.8,-112.1C37,-108.3,74,-109.7,94.7,-91.8Z',
        color: '#F78DA7'
      };
    case 'Berries.ts-Strawberry':
      return {
        d:
          'M100.4,-106.9C119.7,-81.1,117.9,-40.5,124.7,6.8C131.5,54.2,147.1,108.4,127.8,144.3C108.4,180.1,54.2,197.5,14.600000000000001,182.9C-25,168.3,-50,121.6,-82.3,85.8C-114.6,50,-154.3,25,-167.8,-13.4C-181.2,-51.9,-168.4,-103.7,-136,-129.5C-103.7,-155.4,-51.9,-155.2,-5.7,-149.5C40.5,-143.9,81.1,-132.7,100.4,-106.9Z',
        color: '#EB144C'
      };
    case 'Berries.ts-Blueberry':
      return {
        d:

react-cosmos-playground2

Visual interface for browsing React Cosmos fixtures

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Similar packages