How to use @gitgraph/react - 10 common examples

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 / 2-orientations.stories.tsx View on Github external
.add("horizontal", () => (
    
      {(gitgraph) => {
        const master = gitgraph.branch("master").commit("Initial commit");

        // Shouldn't render tags on horizontal mode
        master.tag("v1.0");

        const develop = gitgraph.branch("develop");
        develop.commit("one");
        master.commit("two");
        develop.commit("three");
        master.merge(develop);
        master.commit();
      }}
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 2-orientations.stories.tsx View on Github external
.add("horizontal reverse (black arrow)", () => (
    
      {(gitgraph) => {
        const master = gitgraph.branch("master").commit("Initial commit");
        const develop = gitgraph.branch("develop");
        develop.commit("one");
        master.commit("two");
        develop.commit("three");
        master.merge(develop);
        master.commit();
      }}
    
  ))
  .add("vertical reverse (commit after merge)", () => (
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 5-templates.stories.tsx View on Github external
.add("blackArrow", () => (
    
      {(gitgraph) => {
        const master = gitgraph
          .branch("master")
          .commit("one")
          .commit("two")
          .commit("three");

        const develop = gitgraph.branch("develop").commit("four");
        master.commit("five").tag("important");
        master.merge(develop);

        const feat1 = gitgraph.branch("feat1");
        master.commit().tag("v1");
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 5-templates.stories.tsx View on Github external
.add("blackArrow with reverse arrow", () => (
    
      {(gitgraph) => {
        const master = gitgraph
          .branch("master")
          .commit("one")
          .commit("two")
          .commit("three");
        const develop = gitgraph.branch("develop").commit("four");
        master.commit("five");
        master.merge(develop);
      }}
    
  ))
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 5-templates.stories.tsx View on Github external
.add("blackArrow", () => (
    
      {(gitgraph) => {
        const master = gitgraph
          .branch("master")
          .commit("one")
          .commit("two")
          .commit("three");

        const develop = gitgraph.branch("develop").commit("four");
        master.commit("five").tag("important");
        master.merge(develop);

        const feat1 = gitgraph.branch("feat1");
        master.commit().tag("v1");
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 2-orientations.stories.tsx View on Github external
.add("horizontal (black arrow)", () => (
    
      {(gitgraph) => {
        const master = gitgraph.branch("master").commit("Initial commit");
        const develop = gitgraph.branch("develop");
        develop.commit("one");
        master.commit("two");
        develop.commit("three");
        master.merge(develop);
        master.commit();
      }}
    
  ))
  .add("horizontal reverse (black arrow)", () => (
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 5-templates.stories.tsx View on Github external
.add("blackArrow with reverse arrow", () => (
    
      {(gitgraph) => {
        const master = gitgraph
          .branch("master")
          .commit("one")
          .commit("two")
          .commit("three");
        const develop = gitgraph.branch("develop").commit("four");
        master.commit("five");
        master.merge(develop);
      }}
    
  ))
github nicoespeon / gitgraph.js / packages / stories / src / gitgraph-react / 5-templates.stories.tsx View on Github external
.add("metro", () => (
    
      {(gitgraph) => {
        const master = gitgraph
          .branch("master")
          .commit("one")
          .commit("two")
          .commit("three");
        const develop = gitgraph.branch("develop").commit("four");
        master.merge(develop);
      }}
    
  ))
  .add("blackArrow", () => (
github nicoespeon / gitgraph.js / packages / website / components / Examples.jsx View on Github external
function BasicScenario(props) {
  return (
    
      {(gitgraph) => {
        const master = gitgraph
          .branch("master")
          .commit("Init the project")
          .commit("Add README")
          .commit("Add tests");

        master.tag("v1.0");

        const newFeature = gitgraph.branch("new-feature");