Skip to content
This repository has been archived by the owner on Sep 8, 2018. It is now read-only.

stereobooster/rpi.macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rpi.macro

Build Status Babel Macro

Helper macro for react-precious-image

Usage

Similar to nodejs require call:

import rpi from "rpi.macro";

const meta = rpi("./image.jpg");

Example of usage in create-react-app

import React from "react";
import rpi from "rpi.macro";
import { AdaptiveLoad } from "react-precious-image";

import image from "./images/doggo.jpg";
const meta = rpi("./doggo.jpg");

const App = () => <AdaptiveLoad src={image} alt="doggo" {...meta} />;

Credits

Based on pveyes/raw.macro.

License

MIT

About

Helper macro for react-precious-image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •