-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update badges + add slide with custom renderer to demo showcase
- Loading branch information
Showing
5 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { useEffect, useState } from 'react' | ||
|
||
|
||
export const customRenderer = { | ||
renderer: ({ story, action, isPaused, config, messageHandler }) => { | ||
useEffect(() => { | ||
action('play') | ||
}, [story]) | ||
return <p style={{color: 'white', backgroundColor: 'red'}}> | ||
<h2>{story.title}</h2> | ||
</p> | ||
}, | ||
tester: (story) => { | ||
return { | ||
condition: story.type === 'hcVideo', | ||
priority: 999 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { RenderersItem } from './../interfaces' | ||
import image from './Image'; | ||
import video from './Video'; | ||
import defaultRenderer from './Default'; | ||
import autoplayContent from './AutoPlayContent'; | ||
|
||
export const renderers: RenderersItem[] = [image, video, autoplayContent, defaultRenderer]; |