-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05df37e
commit 04f956f
Showing
8 changed files
with
123 additions
and
13 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
class NotAClass { | ||
constructor(a, b) { | ||
this.a = a; | ||
this.b = b; | ||
this.sum = this.sum.bind(this); | ||
} | ||
|
||
sum() { | ||
return this.a + this.b; | ||
} | ||
} | ||
|
||
const ButtonComponent = (props) => ( | ||
<div>Button</div> | ||
); | ||
|
||
export default ButtonComponent; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import { connect } from 'react-redux'; | ||
|
||
class NotAClass { | ||
constructor(a, b) { | ||
this.a = a; | ||
this.b = b; | ||
this.sum = this.sum.bind(this); | ||
} | ||
|
||
sum() { | ||
return this.a + this.b; | ||
} | ||
} | ||
|
||
const ButtonComponent = (props) => ( | ||
<div>Button</div> | ||
); | ||
|
||
const mapStateToProps = (state) => ({ | ||
|
||
}); | ||
|
||
const mapDispatchToProps = { | ||
|
||
}; | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(ButtonComponent); |
17 changes: 17 additions & 0 deletions
17
src/__tests__/transformations/data/wrap-component/input/button15.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withSomething } from 'react-nothing'; | ||
|
||
const ButtonComponent = ({ name }) => ( | ||
<div> | ||
{name} | ||
</div> | ||
); | ||
|
||
ButtonComponent.propTypes = { | ||
name: PropTypes.string | ||
}; | ||
|
||
const someGetter = (store) => store.path.value; | ||
|
||
export const Button = withSomething(someGetter, ButtonComponent); |
18 changes: 18 additions & 0 deletions
18
src/__tests__/transformations/data/wrap-component/output/button15.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withSomething } from 'react-nothing'; | ||
import { withNothing } from 'with-nothing'; | ||
|
||
const ButtonComponent = ({ name }) => ( | ||
<div> | ||
{name} | ||
</div> | ||
); | ||
|
||
ButtonComponent.propTypes = { | ||
name: PropTypes.string | ||
}; | ||
|
||
const someGetter = (store) => store.path.value; | ||
|
||
export const Button = withSomething(someGetter, withNothing(ButtonComponent)); |
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
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
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