How to use the react-tinacms.withPlugin function in react-tinacms

To help you get started, we’ve selected a few react-tinacms 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 tinacms / tina-starter-grande / src / components / siteLayout.js View on Github external
{ name: "title", label: "Title", component: "text", required: true },
    { name: "path", label: "Path", component: "text", required: true },
  ],
  data(form) {
    return new Promise(resolve => {
      setTimeout(() => {
        resolve({
          title: form.title,
          path: form.path,
        })
      }, 1000)
    })
  },
})

export default withPlugin(MasterLayout, [CreatePostButton, CreatePageButton])

export const Site = styled.div`
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;

  > ${Header} {
    flex: 0 0 auto;
  }

  > ${Footer} {
    flex: 0 0 auto;
  }
github tinacms / tinacms / packages / demo-gatsby / src / components / layout.js View on Github external
date: new Date(),
          heading_color: "pink",
          description: "My new post. ",
        })
      }, 1000)
    })
  },
  body({ title }) {
    return `# ${title}`
  },
  fields: [
    { name: "title", label: "Title", component: "text", required: true },
  ],
})

export default withPlugin(Layout, CreatePostPlugin)

react-tinacms

> This package is no longer necessary or supported. You may instaed use the [`tinacms`](https://www.npmjs.com/tinacms) package directly.

Apache-2.0
Latest version published 5 years ago

Package Health Score

62 / 100
Full package analysis