@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
18 lines (16 loc) • 831 B
JavaScript
import * as React from "react";
import { TYPE_OPTIONS } from "../consts";
import Apple from "../../icons/Apple";
import Google from "../../icons/Google";
import Facebook from "../../icons/Facebook";
import Twitter from "../../icons/Twitter";
import Email from "../../icons/Email";
const getSocialButtonIcon = type => {
if (type === TYPE_OPTIONS.APPLE) return /*#__PURE__*/React.createElement(Apple, null);
if (type === TYPE_OPTIONS.FACEBOOK) return /*#__PURE__*/React.createElement(Facebook, null);
if (type === TYPE_OPTIONS.GOOGLE) return /*#__PURE__*/React.createElement(Google, null);
if (type === TYPE_OPTIONS.TWITTER) return /*#__PURE__*/React.createElement(Twitter, null);
if (type === TYPE_OPTIONS.EMAIL) return /*#__PURE__*/React.createElement(Email, null);
return null;
};
export default getSocialButtonIcon;