// @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';
// $FlowFixMe
import { v4 as uuid } from 'uuid';
type IconProps = {
size: number,
color: string,
};
type CustomProps = {
size?: number,
};
// Returns a react component
// Icons with tooltips need to use this function so the ref can be properly forwarded
const buildIcon = (iconStrokes: React$Node, customSvgValues = {}) =>
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.LBC]: (props: IconProps) => {
const { size = 24, color = 'currentColor', ...rest } = props;
const randomId = uuid();
return (
);
},
[ICONS.REWARDS]: 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.FEEDBACK]: buildIcon(),
[ICONS.SEARCH]: buildIcon(
),
[ICONS.SHARE]: buildIcon(
),
[ICONS.REPORT]: buildIcon(
),
[ICONS.EXTERNAL]: buildIcon(
),
[ICONS.DELETE]: buildIcon(
),
[ICONS.COPY]: buildIcon(
),
[ICONS.REMOVE]: buildIcon(
),
[ICONS.ADD]: buildIcon(
),
[ICONS.SUBTRACT]: 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.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_UP]: buildIcon(
),
[ICONS.SIGN_OUT]: buildIcon(
),
[ICONS.PHONE]: buildIcon(
),
[ICONS.MENU]: buildIcon(
),
[ICONS.DISCOVER]: buildIcon(
),
[ICONS.TRENDING]: buildIcon(
),
[ICONS.TOP]: buildIcon(
),
[ICONS.NEW]: buildIcon(
{' '}
),
[ICONS.INVITE]: buildIcon(
),
[ICONS.VIDEO]: buildIcon(
),
[ICONS.AUDIO]: buildIcon(
),
[ICONS.VOLUME_MUTED]: buildIcon(
),
[ICONS.IMAGE]: buildIcon(
),
[ICONS.TEXT]: buildIcon(
),
[ICONS.DOWNLOADABLE]: buildIcon(
),
[ICONS.REPOST]: buildIcon(
),
[ICONS.MORE_VERTICAL]: buildIcon(
),
[ICONS.VALIDATED]: buildIcon(
),
[ICONS.SLIDERS]: buildIcon(
),
[ICONS.ANALYTICS]: buildIcon(
),
//
// Share modal social icons
//
[ICONS.TWITTER]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.FACEBOOK]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.REDDIT]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.TELEGRAM]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.LINKEDIN]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.EMBED]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.MORE]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.SHARE_LINK]: buildIcon(
,
{
viewBox: '0 0 60 60',
}
),
[ICONS.PURCHASED]: buildIcon(
),
[ICONS.COMPLETED]: buildIcon(
),
[ICONS.NOT_COMPLETED]: buildIcon(),
[ICONS.PINNED]: buildIcon(
),
[ICONS.REFRESH]: buildIcon(
),
[ICONS.BUY]: buildIcon(
),
[ICONS.SEND]: buildIcon(
),
[ICONS.RECEIVE]: buildIcon(
),
[ICONS.OPEN_LOG_FOLDER]: buildIcon(
),
[ICONS.OPEN_LOG]: buildIcon(
),
[ICONS.CAMERA]: buildIcon(
),
[ICONS.LBRY_STATUS]: buildIcon(
),
[ICONS.NOTIFICATION]: buildIcon(
),
[ICONS.POST]: buildIcon(
),
[ICONS.LAYOUT]: buildIcon(
),
[ICONS.REPLY]: buildIcon(
),
[ICONS.YOUTUBE]: buildIcon(
),
[ICONS.UPVOTE]: buildIcon(
),
[ICONS.DOWNVOTE]: buildIcon(
),
[ICONS.FIRE_ACTIVE]: buildIcon(
),
[ICONS.SLIME_ACTIVE]: buildIcon(
),
[ICONS.FIRE]: buildIcon(
),
[ICONS.SLIME]: buildIcon(
),
[ICONS.CONTROVERSIAL]: (props: CustomProps) => (
),
[ICONS.PIN]: (props: CustomProps) => (
),
};