Created
September 16, 2020 12:39
-
-
Save daviddykeuk/6d421a4b6e0ce57af2d442b309e0f40f to your computer and use it in GitHub Desktop.
Ultisnip javascript snippets
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
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