import React from 'react'; import cn from 'classnames'; import { shallowEqual } from '../utils/UtilityFunctions'; /** * Base SVG Icon Component */ class SvgIcon extends React.Component { static propTypes = { className: React.PropTypes.any, style: React.PropTypes.object }; /** * Only rerender an SVG Icon if properties have changed * @param {Object} nextProps Next/Incoming properties * @return {Boolean} True if properties have changed */ shouldComponentUpdate(nextProps) { return !shallowEqual(this.props, nextProps); } /** * Standard SVG view box, can/should be overriden by sub-classes as necessary * @return {String} view box string */ viewBox() { return '0 0 32 32'; } /** * Render the Icon * @return {React.Component} SVG Icon */ render() { return ( {this.svg()} ); } } /** * Bin Icon - Delete */ export class Bin extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Coriolis Logo */ export class CoriolisLogo extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Download / To Inbox */ export class Download extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Eddb.io Logo */ export class Eddb extends SvgIcon { /** * Render the Icon * @return {React.Component} SVG Icon */ render() { return ; } } /** * Embed - <> */ export class Embed extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Equalizer */ export class Equalizer extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 1024 1024'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Floppy disk - save */ export class FloppyDisk extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Fuel Gauge */ export class Fuel extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Github Logo */ export class GitHub extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 1024 1024'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Infinite / Infinity */ export class Infinite extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Info - i within circle */ export class Info extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Link / Permalink / Chain */ export class LinkIcon extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * No Power - Lightning bolt + no entry */ export class NoPower extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 512 512'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Notification - Exclamation mark within circle */ export class Notification extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Power - Lightning Bolt */ export class Power extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 512 512'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Question mark within Circle */ export class Question extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Reload - Clockwise circular arrow */ export class Reload extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Warning - Exclamation point witin triangle */ export class Warning extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Thermal damage */ export class DamageThermal extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Kinetic damage */ export class DamageKinetic extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Explosive damage */ export class DamageExplosive extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Fixed mount hardpoint */ export class MountFixed extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Gimballed mount hardpoint */ export class MountGimballed extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Turrent mount hardpoint */ export class MountTurret extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Rocket ship */ export class Rocket extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * ListModifications (engineers) */ export class ListModifications extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Render the Icon * @return {React.Component} SVG Icon */ render() { return ( {this.svg()} ); } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Modified (engineers) */ export class Modified extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Render the Icon * @return {React.Component} SVG Icon */ render() { return ( {this.svg()} ); } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Hammer */ export class Hammer extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Stats bars / Histogram / Compare */ export class StatsBars extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Cogs / Settings */ export class Cogs extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Power Switch - Reset */ export class Switch extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * In-game Coriolis Station logo */ export class StationCoriolis extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * In-game Ocellus Station logo */ export class StationOcellus extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * In-game Orbis Station logo */ export class StationOrbis extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * In-game Outpost Station logo */ export class StationOutpost extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 200 200'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Upload - From inbox */ export class Upload extends SvgIcon { /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } } /** * Elite Dangerous Loader / Spinner */ export class Loader extends SvgIcon { /** * Overriden view box * @return {String} view box */ viewBox() { return '0 0 40 40'; } /** * Generate the SVG * @return {React.Component} SVG Contents */ svg() { return ; } }