Repository URL to install this package:
|
Version:
0.1.7 ▾
|
import React from 'react';
import { NO_OP } from 'exotic';
import FlagIcon from 'atoms/Icons/FlagIcon';
import { classes } from './fixture';
import { TopBarLinkCurrency, TopBarLinkCountry, TopBarSeparator, StyledButton, TextWrapper, } from './_elements';
// cannot haz button inside button
const HeaderWrap = props => React.createElement(StyledButton, Object.assign({ qa: "qa-locale", className: classes.wrap }, props));
/**
* @alias CurrentLocaleSummary
* @alias TopBarLocale
* @type {Molecule}
*
* ========= ============ ===============
* || flag || || Country || || (Language) ||
* ========= ============ ===============
*/
class TopBarLocale extends React.PureComponent {
render() {
const { onClick } = this.props;
const { humanized, currency, name, country } = this.props;
return (React.createElement(HeaderWrap, { onClick: onClick },
React.createElement(FlagIcon, { text: humanized, country: country }),
React.createElement(TextWrapper, null,
React.createElement(TopBarLinkCurrency, null, currency),
React.createElement(TopBarSeparator, null),
React.createElement(TopBarLinkCountry, null, name))));
}
}
TopBarLocale.defaultProps = {
currency: 'USD',
humanized: 'USA',
onClick: NO_OP,
name: '',
country: 'UNITED STATES',
};
export default TopBarLocale;
//# sourceMappingURL=TopBarLocale.js.map