This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

next-amp-element
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Getting Started

Add amp element easily.

Install

npm

npm install next-amp-element    

pnpm

pnpm add next-amp-element

yarn

yarn add next-amp-element

Example

AmpState

import { AmpState } from "next-amp-element"

const App = () => {
  return (
    <>
      <AmpState id="testState">
        <>
          {{
            message: "Hello World",
          }}
        </>
      </AmpState>
      <button
        on="tap:AMP.setState({
            hello: testState.message
            })"
      >
        Click
      </button>
      <span data-amp-bind-text="hello" />
    </>
  )
}

AmpScript

import { AmpScript } from "next-amp-element"

const App = () => {
  return (
    <AmpScript
      src={`your-script-url-or-path`}
    />
  )
}

AmpCustomElement

import { AmpVideo } from "next-amp-element"

const App = () => {
  return <AmpVideo>Your Video</AmpVideo>
}

You can check here to see all amp custom elements.

Readme

Keywords

none

Package Sidebar

Install

npm i next-amp-element

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

133 kB

Total Files

34

Last publish

Collaborators

  • karyanayandi