Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Remark SnackPlayer Plugin for reactnative.dev enabling react native web previews

License

Notifications You must be signed in to change notification settings

darshkpatel/remark-snackplayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This has been moved to facebook/react-native-website

This plugin was a part of efforts for migrating the React Native's website to Docusaurus v2 (Parent PR Link) (Commit Link)

Remark SnackPlayer

Remark plugin to embed Expo Snack's using Code Blocks

GitHub Workflow Status npm bundle size Libraries.io dependency status for latest release npm


Javascript Javascript

Installing

npm install remark-snackplayer

or

yarn add remark-snackplayer

Usage

This plugin parses codeblocks with language set as SnackPlayer and replaces them with embedded Expo's SnackPlayers, you can also provide parameters along with the codeblock to set some basic details.

Example Code Block:


```SnackPlayer name=Hello%20World description=This%20is%20a%20description
import React from 'react';
import { Text, View } from 'react-native';

const YourApp = () => {
    return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
        <Text>
        Try editing me! 🎉
        </Text>
    </View>
    );
}

export default YourApp;```


The above code snippet would look like this on your page

Screenshot 2020-10-03 at 1 11 19 AM

Parameters:

Name Description Default
name SnackPlayer Name "Example"
description Description of the example "Example usage"
platform Example Platform "ios"
supportedPlatforms Supported Platforms "ios,android,web"

To Do

  • Support Passing Configuration Parameters
  • Write Comprehensive tests

License

MIT © Darsh Patel

About

Remark SnackPlayer Plugin for reactnative.dev enabling react native web previews

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published