Components

FacebookElement

<FacebookElement />

Constructor

# <FacebookElement />

Attachment is a story element and is displayed for type: file, subtype: attachment

Parameters:
Name Type Description
params Object

object containing parameters

story Object

story object

config Object

config object

element Object

the story element. This is same as the story element found in the story API response

View Source atoms/story-elements/attachment/attachment.tsx, line 32

<FacebookElement />

Constructor

# <FacebookElement />

FacebookElement is a story element. The look of the FacebookElement can be changed using the render prop facebookElementRender. In case facebookElementRender is passed in the config, it is rendered. Otherwise a default FacebookElement is rendered.

Parameters:
Name Type Description
params Object

object containing parameters passed to the render prop

story Object

story object

config Object

config object

element Object

the story element. This is same as the story element found in the story API response

...
ampRoutes(app, {
 render: {
   storyElementRender: {
     facebookElementRender: ({ story, config, element }) => <MyCustomFacebookElement story={story} config={config} storyElement={element} />
   }
 }
})
...

View Source atoms/story-elements/facebook-element/facebook-element.tsx, line 19