Repository URL to install this package:
|
Version:
0.0.3 ▾
|
import * as React from 'react';
import { NO_OP } from 'exotic';
import { FlagIcon } from '@skava/packages/ui';
import { TopBarLocaleWrap, TopBarLinkCurrency, TopBarLinkCountry, TopBarSeparator, TextWrapper, } from './styled';
/**
* @name TopBarLocale
* ========= ============ ===============
* || flag || || Country || || (Language) ||
* ========= ============ ===============
*/
class LocaleFlagButton extends React.PureComponent {
render() {
const { onClick } = this.props;
const { humanized, currency, name, country } = this.props;
return (React.createElement(TopBarLocaleWrap, { 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))));
}
}
LocaleFlagButton.defaultProps = {
currency: 'USD',
humanized: 'USA',
onClick: NO_OP,
name: '',
country: 'UNITED STATES',
};
export { LocaleFlagButton };
//# sourceMappingURL=LocaleFlagButton.js.map