Skip to content

Instantly share code, notes, and snippets.

@roNn23
Last active May 2, 2020 13:33
Show Gist options
  • Save roNn23/ad7175760bd40d5b13b5e6693cc6a6ff to your computer and use it in GitHub Desktop.
Save roNn23/ad7175760bd40d5b13b5e6693cc6a6ff to your computer and use it in GitHub Desktop.
components #react
// eslint-disable-next-line react/prop-types
const AvailableAddress = ({ address }) => {
return (
<AddressStatus address={address} status="isAvailable" />
)
};
import React, { Component } from 'react';
import AddressForm from '../AddressForm/AddressForm';
import AddressStatus from '../../components/AddressStatus';
import AddressSuggestion from '../../components/AddressSuggestion';
class AvailabilityCheck extends Component {
constructor (props) {
super(props);
this.state = {
addressStatus: null,
};
}
render () {
return (
<div className="availability-check background-color--bright">
<h3>Verfügbarkeitsprüfung</h3>
<AddressStatus address={this.state.address} status="isNotAvailable" />
<AddressStatus address={this.state.address} status="isAvailable" />
<AddressStatus address={this.state.address} status="isAmbiguous" />
<AddressSuggestion addresses={this.state.addressSuggestions} />
<AddressForm />
</div>
);
}
}
export default AvailabilityCheck;
import PropTypes from 'prop-types'
import React from 'react'
import './Component.scss'
import classNames from 'classname'
const Component = ({ className }) => {
const handleOnClick = () => {
console.log('Hallo Welt');
}
return (
<div className={classNames('comp-component', className)} onClick={handleOnClick}>
Hallo Welt
</div>
)
}
Component.propTypes = {
className: PropTypes.string,
}
export default Component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment