-
Notifications
You must be signed in to change notification settings - Fork 0
/
snippets
112 lines (82 loc) · 2.21 KB
/
snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
snippet testid
'[data-testid="${0}"]'
snippet theme
${({theme}) => theme.${0}};
snippet disable
/* eslint-disable */
snippet rel
rel="noopener noreferrer"
snippet story
import React from 'react';
import ${1:ComponentName} from './';
export default {
component: $1,
title: 'components/$1',
}
export const defaultComponent = () => (
<$1>some children</$1>
);
snippet cn
import classNames from 'classnames';
snippet lorem
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
snippet jsxcomment
{/* ${1} */}
snippet getbounding
getBoundingClientRect()
snippet media
const sizes = {
sm: '20em',
md: '48em',
lg: '64em',
};
export const media = {
sm: \`@media only screen and (max-width: ${sizes.md})\`,
ns: \`@media screen and (min-width: ${sizes.md})\`,
md: \`@media screen and (min-width: ${sizes.md}) and (max-width: ${sizes.lg})\`,
lg: \`@media screen and (min-width: ${sizes.lg})\`,
};
snippet ic
import { ${1: ComponentName } } from 'components';
snippet eslint-disable
// eslint-disable-next-line
snippet styled
import styled from 'styled-components';
snippet connect
import { connect } from 'react-redux';
snippet exportfile
export {default as ${1:name}} from './$1';
snippet pts
PropTypes.string,
snippet ptf
PropTypes.func,
snippet ptn
PropTypes.number,
snippet ptb
PropTypes.bool,
snippet pta
PropTypes.any,
snippet ri
import React from 'react';
import PropTypes from 'prop-types';
snippet rf
function ${1:Component Name}() {
return (
<div className="$1">
<span>$1</span>
</div>
)
}
$1.propTypes = {}
$1.defaultProps = {}
export default $1;
snippet rc
export default class ${1:component_name} extends React.Component {
static propTypes = {}
static defaultProps = {}
render() {
return (
<div className="$1">${0:content}</div>
);
}
}