File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -130,9 +130,7 @@ def component_name
130
130
def file_header
131
131
if webpacker?
132
132
if options [ :coffee ]
133
- %|import React from 'react'\n |
134
- %|import PropTypes from 'prop-types'\n |
135
- %|export default |
133
+ %|import React from 'react'\n import PropTypes from 'prop-types'\n |
136
134
else
137
135
%|var React = require("react")\n |
138
136
end
Original file line number Diff line number Diff line change 1
1
< %= file_header % >
2
- class @ < %= component_name % > extends React .Component
2
+ export default class @ < %= component_name % > extends React .Component
3
3
< % if attributes .size > 0 -% >
4
4
@propTypes =
5
5
< % attributes .each do | attribute| -% >
@@ -17,5 +17,4 @@ class @<%= component_name %> extends React.Component
17
17
< % else -% >
18
18
` < div / > `
19
19
< % end -% >
20
-
21
- < %= file_footer % >
20
+ < %= file_footer % >
You can’t perform that action at this time.
0 commit comments