Skip to content

Instantly share code, notes, and snippets.

@daviddykeuk
Created September 16, 2020 12:39
Show Gist options
  • Save daviddykeuk/6d421a4b6e0ce57af2d442b309e0f40f to your computer and use it in GitHub Desktop.
Save daviddykeuk/6d421a4b6e0ce57af2d442b309e0f40f to your computer and use it in GitHub Desktop.
Ultisnip javascript snippets
snippet c "A simple react component" b
import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import { $2 } from '@material-ui/core';
const styles = theme => ({
root: {
padding: theme.spacing(1)
}
})
const $1 = withStyles(styles)(({classes}) => (
<$2 className={classes.root}>
</$2>
))
export default $1;
endsnippet
snippet s "A simple storybook story" b
import React from "react";
import {withKnobs} from "@storybook/addon-knobs";
import { $1 } from "../../../components";
export default {
title: "$2",
decorators: [withKnobs],
component: $1,
};
export const Standard = () => (
<$1 />
);
endsnippet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment