This file contains hidden or 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
import {CommentList} from '../CommentList'; | |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
describe('Given the <CommentList/> component', () => { | |
const requiredProps = () => ({}); | |
const render = (props = requiredProps()) => shallow(<CommentList {...props} />); | |
test('should render', () => { |
This file contains hidden or 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
import * as React from 'react'; | |
import {MyComponent} from './MyComponent'; | |
import {consumingComponent} from './ConsumingComponent.scss'; | |
const ConsumingComponent = () => ( | |
<MyComponent | |
HeaderProps={{ | |
color: 'red' | |
data-testid='consuming-component-header' | |
type: 'compact' |
This file contains hidden or 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
import * as React from 'react'; | |
import {Greeting, greetingProps} from './Greeting'; | |
import {Header, headerProps} from './Header'; | |
import PropTypes from 'prop-types'; | |
import classnames from 'classnames'; | |
import {myComponent} from './MyComponent.scss'; | |
export const MyComponent = (props) => { | |
const { | |
HeaderProps, |
This file contains hidden or 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
import * as React from 'react'; | |
import {Greeting} from './Greeting'; | |
import {Header} from './Header'; | |
import PropTypes from 'prop-types'; | |
import classnames from 'classnames'; | |
import {myComponent} from './MyComponent.scss'; | |
export const MyComponent = (props) => { | |
const { | |
className, |
This file contains hidden or 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
import * as React from 'react'; | |
import {Greeting} from './Greeting'; | |
import PropTypes from 'prop-types'; | |
import classnames from 'classnames'; | |
import {myComponent} from './MyComponent.scss'; | |
export const MyComponent = ({className, color, greeting, ...otherProps}) => ( | |
<section | |
{...otherProps} | |
className={classnames(className, myComponent)} |
This file contains hidden or 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
import * as React from 'react'; | |
import PropTypes from 'prop-types'; | |
import classnames from 'classnames'; | |
import {myComponent} from './MyComponent.scss'; | |
export const MyComponent = ({className, greeting, ...otherProps}) => ( | |
<section | |
{...otherProps} | |
className={classnames(className, myComponent)} | |
> |
This file contains hidden or 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
import * as React from 'react'; | |
import PropTypes from 'prop-types'; | |
import classnames from 'classnames'; | |
import {myComponent} from './MyComponent.scss'; | |
export const MyComponent = ({className, greeting}) => ( | |
<section className={classnames(className, myComponent)}> | |
{greeting} | |
</section> | |
); |
This file contains hidden or 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
import * as React from 'react'; | |
import PropTypes from 'prop-types'; | |
import classnames from 'classnames'; | |
import {myComponent} from './MyComponent.scss'; | |
export const MyComponent = (props) => ( | |
<section className={classnames(props.className, myComponent)}> | |
Hello world. | |
</section> | |
); |
This file contains hidden or 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
import * as React from 'react'; | |
import {myComponent} from './MyComponent.scss'; | |
export const MyComponent = () => ( | |
<section className={myComponent}> | |
Hello world. | |
</section> | |
); |
This file contains hidden or 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
import React from 'react'; | |
import {UserGreetingConnector as UserGreeting} from './user-greeting-connector'; | |
export const UserDashboard = () => ( | |
<UserGreeting/> | |
); |