How to use the react-cosmos-shared2/fixtureState.createValues function in react-cosmos-shared2

To help you get started, we’ve selected a few react-cosmos-shared2 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 / packages / react-cosmos-fixture / src / __tests__ / childrenTransition.tsx View on Github external
});
        await fixtureStateChange({
          rendererId,
          fixtureId,
          fixtureState: {
            props: [
              anyProps({
                values: {
                  children: {
                    type: 'unserializable',
                    stringifiedValue: `\n  brah\n`
                  }
                }
              }),
              anyProps({
                values: createValues({ children: 'brah' })
              })
            ]
          }
        });
      }
    );
github react-cosmos / react-cosmos / packages / react-cosmos-fixture / src / FixtureCapture / classState / useFixtureState.ts View on Github external
setFixtureState(prevFs => ({
            ...prevFs,
            classState: createFixtureStateClassState({
              fixtureState: prevFs,
              elementId,
              values: createValues(state),
              componentName: getComponentName(
                elRef.constructor as React.ComponentType
              )
            })
          }));
        }
github react-cosmos / react-cosmos / packages / react-cosmos-fixture / src / FixtureCapture / props / index.ts View on Github external
setFixtureState(prevFs => ({
          ...prevFs,
          props: createFixtureStateProps({
            fixtureState: prevFs,
            elementId,
            values: createValues(childEl.props),
            componentName
          })
        }));
      } else if (