// @flow
// A housing for all of our icons. Mostly taken from https://github.com/feathericons/react-feather
import * as ICONS from 'constants/icons';
import React, { forwardRef } from 'react';
type IconProps = {
size: number,
color: string,
};
// Returns a react component
// Icons with tooltips need to use this function so the ref can be properly forwarded
const buildIcon = (iconStrokes: React$Node) =>
forwardRef((props: IconProps, ref) => {
const { size = 24, color = 'currentColor', ...otherProps } = props;
return (
);
});
export const icons = {
// The LBRY icon is different from the base icon set so don't use buildIcon()
[ICONS.LBRY]: () => (
),
[ICONS.FEATURED]: buildIcon(
),
[ICONS.ARROW_LEFT]: buildIcon(
),
[ICONS.ARROW_RIGHT]: buildIcon(
),
[ICONS.HOME]: buildIcon(
),
[ICONS.PUBLISH]: buildIcon(
),
[ICONS.SUBSCRIBE]: buildIcon(
),
[ICONS.UNSUBSCRIBE]: buildIcon(
),
[ICONS.SETTINGS]: buildIcon(
),
[ICONS.ACCOUNT]: buildIcon(
),
[ICONS.OVERVIEW]: buildIcon(),
[ICONS.WALLET]: buildIcon(
),
[ICONS.LIBRARY]: buildIcon(),
[ICONS.EDIT]: buildIcon(
),
[ICONS.DOWNLOAD]: buildIcon(
),
[ICONS.HELP]: buildIcon(
),
[ICONS.BLOCK]: buildIcon(
),
[ICONS.UNBLOCK]: buildIcon(
),
[ICONS.LIGHT]: buildIcon(
),
[ICONS.DARK]: buildIcon(),
[ICONS.SEARCH]: buildIcon(
),
[ICONS.TIP]: buildIcon(
),
[ICONS.SHARE]: buildIcon(
),
[ICONS.REPORT]: buildIcon(
),
[ICONS.EXTERNAL]: buildIcon(
),
[ICONS.DELETE]: buildIcon(
),
[ICONS.COPY]: buildIcon(
),
[ICONS.REMOVE]: buildIcon(
),
[ICONS.ADD]: buildIcon(
),
[ICONS.CHAT]: buildIcon(
),
[ICONS.YES]: buildIcon(
),
[ICONS.NO]: buildIcon(
),
[ICONS.UP]: buildIcon(),
[ICONS.DOWN]: buildIcon(),
[ICONS.FULLSCREEN]: buildIcon(
),
[ICONS.FILE]: buildIcon(
),
[ICONS.CHANNEL]: buildIcon(
),
[ICONS.TWITTER]: buildIcon(
),
[ICONS.FACEBOOK]: buildIcon(),
[ICONS.WEB]: buildIcon(
),
[ICONS.ALERT]: buildIcon(
),
[ICONS.UNLOCK]: buildIcon(
),
[ICONS.LOCK]: buildIcon(
),
[ICONS.TAG]: buildIcon(
),
[ICONS.SUPPORT]: buildIcon(
),
[ICONS.EYE]: buildIcon(
),
[ICONS.EYE_OFF]: buildIcon(
),
[ICONS.VIEW]: buildIcon(
),
[ICONS.SIGN_IN]: buildIcon(
),
[ICONS.SIGN_OUT]: buildIcon(
),
[ICONS.PHONE]: buildIcon(
),
};