How to use the @gitgraph/react.Mode.Compact function in @gitgraph/react

To help you get started, we’ve selected a few @gitgraph/react 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 nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 1-basic-usage.stories.tsx View on Github external
.add("compact mode", () => (
    
      {(gitgraph) => {
        const master = gitgraph
          .branch("master")
          .commit()
          .commit();

        // Branch has more commits.
        const develop = gitgraph.branch("develop").commit();
        master.merge(develop);

        // Branch & master have as much commits.
        const feat1 = gitgraph.branch("feat1").commit();
        master.commit();
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 6-custom-renders.stories.tsx View on Github external
);
    };

    return (
      
        {(gitgraph) => {
          gitgraph
            .commit({ subject: "Initial commit" })
            .commit({ subject: "Another commit" })
            .commit({
              subject: "Do something crazy",
              renderTooltip,
            });

          gitgraph
            .branch("dev")
            .commit({
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 4-imports.stories.tsx View on Github external
.add("import & compact mode", () => (
    
      {(gitgraph) => {
        gitgraph.import(deletedBranch);
      }}
    
  ));