colouring-montreal/app/src/frontend/components/icons.tsx

120 lines
2.1 KiB
TypeScript
Raw Normal View History

2018-10-01 10:20:45 -04:00
/**
* Mini-library of icons
*/
2019-11-07 03:13:30 -05:00
import { library } from '@fortawesome/fontawesome-svg-core';
import {
faAngleLeft,
faAngleRight,
faCaretDown,
faCaretRight,
faCaretUp,
faCheck,
faCheckCircle,
faCheckDouble,
faEye,
faInfoCircle,
faPaintBrush,
faQuestionCircle,
faSearch,
faSpinner,
faTimes
} from '@fortawesome/free-solid-svg-icons';
2019-11-07 03:13:30 -05:00
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React from 'react';
2018-10-01 10:20:45 -04:00
library.add(
faQuestionCircle,
faInfoCircle,
faPaintBrush,
faTimes,
faCheck,
faCheckCircle,
2018-10-01 10:20:45 -04:00
faCheckDouble,
faAngleLeft,
2020-01-27 12:58:08 -05:00
faAngleRight,
faCaretDown,
2019-09-04 15:47:29 -04:00
faCaretUp,
2019-10-08 09:20:22 -04:00
faCaretRight,
2019-08-23 09:56:29 -04:00
faSearch,
faEye,
faSpinner
2018-10-01 10:20:45 -04:00
);
const HelpIcon = () => (
<FontAwesomeIcon icon="question-circle" />
);
const InfoIcon = () => (
<FontAwesomeIcon icon="info-circle" />
);
const EditIcon = () => (
<FontAwesomeIcon icon="paint-brush" />
);
2019-08-23 09:56:29 -04:00
const ViewIcon = () => (
<FontAwesomeIcon icon="eye" />
);
2018-10-01 10:20:45 -04:00
const CloseIcon = () => (
<FontAwesomeIcon icon="times" />
);
const SaveIcon = () => (
<FontAwesomeIcon icon="check" />
);
const SaveDoneIcon = () => (
<FontAwesomeIcon icon="check-double" />
);
const VerifyIcon = () => (
<FontAwesomeIcon icon="check-circle" />
)
2018-10-01 10:20:45 -04:00
const BackIcon = () => (
<FontAwesomeIcon icon="angle-left" />
);
2018-10-01 10:20:45 -04:00
2020-01-27 12:58:08 -05:00
const ForwardIcon = () => (
<FontAwesomeIcon icon="angle-right" />
);
2018-10-01 10:20:45 -04:00
const DownIcon = () => (
<FontAwesomeIcon icon="caret-down" />
);
2019-09-04 15:47:29 -04:00
const UpIcon = () => (
<FontAwesomeIcon icon="caret-up" />
);
2019-10-08 09:20:22 -04:00
const RightIcon = () => (
<FontAwesomeIcon icon="caret-right" />
);
const SearchIcon = () => (
<FontAwesomeIcon icon="search" />
);
2018-10-01 10:20:45 -04:00
const SpinnerIcon: React.FC<{spin?: boolean}> = ({spin=true}) => (
<FontAwesomeIcon icon="spinner" spin={spin} />
);
2019-08-23 09:56:29 -04:00
export {
HelpIcon,
InfoIcon,
EditIcon,
ViewIcon,
CloseIcon,
SaveIcon,
SaveDoneIcon,
BackIcon,
2020-01-27 12:58:08 -05:00
ForwardIcon,
2019-08-23 09:56:29 -04:00
DownIcon,
2019-09-04 15:47:29 -04:00
UpIcon,
2019-10-08 09:20:22 -04:00
RightIcon,
SearchIcon,
VerifyIcon,
SpinnerIcon
2019-08-23 09:56:29 -04:00
};