From c6d58bdc2d5b27ff78790f44231357a09f77c56e Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Mon, 6 Mar 2023 02:16:00 -0500 Subject: [PATCH] Convert icons to functional components --- renderer/src/ui/icons/bdlogo.jsx | 16 +++++++--------- renderer/src/ui/icons/check.jsx | 14 ++++++-------- renderer/src/ui/icons/close.jsx | 18 ++++++++---------- renderer/src/ui/icons/cog.jsx | 14 ++++++-------- renderer/src/ui/icons/delete.jsx | 14 ++++++-------- renderer/src/ui/icons/detach.jsx | 14 ++++++-------- renderer/src/ui/icons/dollarsign.jsx | 12 +++++------- renderer/src/ui/icons/downarrow.jsx | 12 +++++------- renderer/src/ui/icons/edit.jsx | 14 ++++++-------- renderer/src/ui/icons/error.jsx | 15 ++++++--------- renderer/src/ui/icons/extension.jsx | 16 +++++++--------- renderer/src/ui/icons/favorite.jsx | 11 +++++------ renderer/src/ui/icons/fullscreen.jsx | 16 +++++++--------- renderer/src/ui/icons/github.jsx | 14 ++++++-------- renderer/src/ui/icons/globe.jsx | 18 ++++++++---------- renderer/src/ui/icons/grid.jsx | 16 +++++++--------- renderer/src/ui/icons/history.jsx | 16 +++++++--------- renderer/src/ui/icons/keyboard.jsx | 16 +++++++--------- renderer/src/ui/icons/list.jsx | 16 +++++++--------- renderer/src/ui/icons/magnifyingglass.jsx | 22 ++++++++++------------ renderer/src/ui/icons/next.jsx | 14 ++++++-------- renderer/src/ui/icons/patreon.jsx | 16 +++++++--------- renderer/src/ui/icons/previous.jsx | 14 ++++++-------- renderer/src/ui/icons/radio.jsx | 18 ++++++++---------- renderer/src/ui/icons/reload.jsx | 14 ++++++-------- renderer/src/ui/icons/save.jsx | 16 +++++++--------- renderer/src/ui/icons/search.jsx | 16 +++++++--------- renderer/src/ui/icons/support.jsx | 16 +++++++--------- renderer/src/ui/icons/theme.jsx | 16 +++++++--------- renderer/src/ui/icons/twitch.jsx | 9 ++++----- 30 files changed, 197 insertions(+), 256 deletions(-) diff --git a/renderer/src/ui/icons/bdlogo.jsx b/renderer/src/ui/icons/bdlogo.jsx index e10c56dd..d6dc74d1 100644 --- a/renderer/src/ui/icons/bdlogo.jsx +++ b/renderer/src/ui/icons/bdlogo.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class BDLogo extends React.Component { - render() { - return - - - - ; - } -} \ No newline at end of file +export default function BDLogo(props) { + return + + + + ; +} diff --git a/renderer/src/ui/icons/check.jsx b/renderer/src/ui/icons/check.jsx index c84fd0fc..d994ea89 100644 --- a/renderer/src/ui/icons/check.jsx +++ b/renderer/src/ui/icons/check.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Checkmark extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } +export default function Checkmark(props) { + const size = props.size || "24px"; + return + + + ; } \ No newline at end of file diff --git a/renderer/src/ui/icons/close.jsx b/renderer/src/ui/icons/close.jsx index b93cba8e..55a45c0a 100644 --- a/renderer/src/ui/icons/close.jsx +++ b/renderer/src/ui/icons/close.jsx @@ -1,13 +1,11 @@ import {React} from "modules"; -export default class CloseButton extends React.Component { - render() { - const size = this.props.size || "18px"; - return - - - - - ; - } +export default function Close(props) { + const size = props.size || "18px"; + return + + + + + ; } \ No newline at end of file diff --git a/renderer/src/ui/icons/cog.jsx b/renderer/src/ui/icons/cog.jsx index 4d76b92a..9a929bf5 100644 --- a/renderer/src/ui/icons/cog.jsx +++ b/renderer/src/ui/icons/cog.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Cog extends React.Component { - render() { - const size = this.props.size || "20px"; - return - - - ; - } +export default function Cog(props) { + const size = props.size || "20px"; + return + + + ; } \ No newline at end of file diff --git a/renderer/src/ui/icons/delete.jsx b/renderer/src/ui/icons/delete.jsx index 4dcc5d16..92f4d79d 100644 --- a/renderer/src/ui/icons/delete.jsx +++ b/renderer/src/ui/icons/delete.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Delete extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } +export default function Delete(props) { + const size = props.size || "24px"; + return + + + ; } \ No newline at end of file diff --git a/renderer/src/ui/icons/detach.jsx b/renderer/src/ui/icons/detach.jsx index e12449d9..8e5ade9f 100644 --- a/renderer/src/ui/icons/detach.jsx +++ b/renderer/src/ui/icons/detach.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Detach extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } +export default function Detach(props) { + const size = props.size || "24px"; + return + + + ; } \ No newline at end of file diff --git a/renderer/src/ui/icons/dollarsign.jsx b/renderer/src/ui/icons/dollarsign.jsx index 3352af7a..5634e440 100644 --- a/renderer/src/ui/icons/dollarsign.jsx +++ b/renderer/src/ui/icons/dollarsign.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class DollarSign extends React.Component { - render() { - const size = this.props.size || "18px"; - return - - +export default function DollarSign(props) { + const size = props.size || "18px"; + return + + ; - } } \ No newline at end of file diff --git a/renderer/src/ui/icons/downarrow.jsx b/renderer/src/ui/icons/downarrow.jsx index 556bd932..96d40694 100644 --- a/renderer/src/ui/icons/downarrow.jsx +++ b/renderer/src/ui/icons/downarrow.jsx @@ -1,10 +1,8 @@ import {React} from "modules"; -export default class DownArrow extends React.Component { - render() { - const size = this.props.size || "16px"; - return - - ; - } +export default function DownArrow(props) { + const size = props.size || "16px"; + return + + ; } \ No newline at end of file diff --git a/renderer/src/ui/icons/edit.jsx b/renderer/src/ui/icons/edit.jsx index 17e407d6..e7cf3109 100644 --- a/renderer/src/ui/icons/edit.jsx +++ b/renderer/src/ui/icons/edit.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Edit extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } +export default function Edit(props) { + const size = props.size || "24px"; + return + + + ; } \ No newline at end of file diff --git a/renderer/src/ui/icons/error.jsx b/renderer/src/ui/icons/error.jsx index eb1bf767..5c6a7e5f 100644 --- a/renderer/src/ui/icons/error.jsx +++ b/renderer/src/ui/icons/error.jsx @@ -1,12 +1,9 @@ import {React} from "modules"; -export default class Error extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } +export default function Error(props) { + const size = props.size || "24px"; + return + + + ; } - diff --git a/renderer/src/ui/icons/extension.jsx b/renderer/src/ui/icons/extension.jsx index 0f396de0..d908cd2c 100644 --- a/renderer/src/ui/icons/extension.jsx +++ b/renderer/src/ui/icons/extension.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Extension extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } -} \ No newline at end of file +export default function Extension(props) { + const size = props.size || "24px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/favorite.jsx b/renderer/src/ui/icons/favorite.jsx index 1d85e40b..929bb316 100644 --- a/renderer/src/ui/icons/favorite.jsx +++ b/renderer/src/ui/icons/favorite.jsx @@ -1,9 +1,8 @@ import {React} from "modules"; -export default class Favorite extends React.Component { - render() { - return - +export default function Favorite(props) { + const size = props.size || "24px"; + return + ; - } -} \ No newline at end of file +} diff --git a/renderer/src/ui/icons/fullscreen.jsx b/renderer/src/ui/icons/fullscreen.jsx index 06ffc02d..41ee8d71 100644 --- a/renderer/src/ui/icons/fullscreen.jsx +++ b/renderer/src/ui/icons/fullscreen.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class FullScreen extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } -} \ No newline at end of file +export default function FullScreen(props) { + const size = props.size || "24px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/github.jsx b/renderer/src/ui/icons/github.jsx index 180ff1ff..851bc2cd 100644 --- a/renderer/src/ui/icons/github.jsx +++ b/renderer/src/ui/icons/github.jsx @@ -1,10 +1,8 @@ import {React} from "modules"; -export default class GitHub extends React.Component { - render() { - const size = this.props.size || "18px"; - return - - ; - } -} \ No newline at end of file +export default function GitHub(props) { + const size = props.size || "18px"; + return + + ; +} diff --git a/renderer/src/ui/icons/globe.jsx b/renderer/src/ui/icons/globe.jsx index c543802e..b89a3d53 100644 --- a/renderer/src/ui/icons/globe.jsx +++ b/renderer/src/ui/icons/globe.jsx @@ -1,12 +1,10 @@ import {React} from "modules"; -export default class Globe extends React.Component { - render() { - const size = this.props.size || "18px"; - const color = this.props.color || "#FFFFFF"; - return - - - ; - } -} \ No newline at end of file +export default function Globe(props) { + const size = props.size || "18px"; + const color = props.color || "#FFFFFF"; + return + + + ; +} diff --git a/renderer/src/ui/icons/grid.jsx b/renderer/src/ui/icons/grid.jsx index 89f9940b..1e926576 100644 --- a/renderer/src/ui/icons/grid.jsx +++ b/renderer/src/ui/icons/grid.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Grid extends React.Component { - render() { - const size = this.props.size || "20px"; - return - - - ; - } -} \ No newline at end of file +export default function Grid(props) { + const size = props.size || "20px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/history.jsx b/renderer/src/ui/icons/history.jsx index 19fc43be..92999de0 100644 --- a/renderer/src/ui/icons/history.jsx +++ b/renderer/src/ui/icons/history.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class History extends React.Component { - render() { - const size = this.props.size || "18px"; - return - - - ; - } -} \ No newline at end of file +export default function History(props) { + const size = props.size || "18px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/keyboard.jsx b/renderer/src/ui/icons/keyboard.jsx index 5472f2a3..52161f60 100644 --- a/renderer/src/ui/icons/keyboard.jsx +++ b/renderer/src/ui/icons/keyboard.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Keyboard extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } -} \ No newline at end of file +export default function Keyboard(props) { + const size = props.size || "24px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/list.jsx b/renderer/src/ui/icons/list.jsx index 9e6f3167..b6011e1a 100644 --- a/renderer/src/ui/icons/list.jsx +++ b/renderer/src/ui/icons/list.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class List extends React.Component { - render() { - const size = this.props.size || "20px"; - return - - - ; - } -} \ No newline at end of file +export default function List(props) { + const size = props.size || "20px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/magnifyingglass.jsx b/renderer/src/ui/icons/magnifyingglass.jsx index e5c61dc1..1d838d50 100644 --- a/renderer/src/ui/icons/magnifyingglass.jsx +++ b/renderer/src/ui/icons/magnifyingglass.jsx @@ -1,11 +1,10 @@ import {React} from "modules"; -export default class MagnifyingGlass extends React.Component { - render() { - const size = this.props.size || "160px"; - return - - +export default function MagnifyingGlass(props) { + const size = props.size || "160px"; + return + + @@ -15,9 +14,8 @@ export default class MagnifyingGlass extends React.Component { - - - - ; - } -} \ No newline at end of file + + + + ; +} diff --git a/renderer/src/ui/icons/next.jsx b/renderer/src/ui/icons/next.jsx index 50b1b993..c2e01393 100644 --- a/renderer/src/ui/icons/next.jsx +++ b/renderer/src/ui/icons/next.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class ArrowRight extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - +export default function ArrowRight(props) { + const size = props.size || "24px"; + return + + ; - } -} \ No newline at end of file +} diff --git a/renderer/src/ui/icons/patreon.jsx b/renderer/src/ui/icons/patreon.jsx index f408a7e3..573d8c2a 100644 --- a/renderer/src/ui/icons/patreon.jsx +++ b/renderer/src/ui/icons/patreon.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Patreon extends React.Component { - render() { - const size = this.props.size || "18px"; - return - - - ; - } -} \ No newline at end of file +export default function Patreon(props) { + const size = props.size || "18px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/previous.jsx b/renderer/src/ui/icons/previous.jsx index 913705df..36407172 100644 --- a/renderer/src/ui/icons/previous.jsx +++ b/renderer/src/ui/icons/previous.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class ArrowLeft extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - +export default function ArrowLeft(props) { + const size = props.size || "24px"; + return + + ; - } -} \ No newline at end of file +} diff --git a/renderer/src/ui/icons/radio.jsx b/renderer/src/ui/icons/radio.jsx index d56d9c84..b08f2445 100644 --- a/renderer/src/ui/icons/radio.jsx +++ b/renderer/src/ui/icons/radio.jsx @@ -1,12 +1,10 @@ import {React} from "modules"; -export default class Radio extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - {this.props.checked && } - {!this.props.checked && } - ; - } -} \ No newline at end of file + export default function Radio(props) { + const size = props.size || "24px"; + return + + {props.checked && } + {!props.checked && } + ; +} diff --git a/renderer/src/ui/icons/reload.jsx b/renderer/src/ui/icons/reload.jsx index 385a6f26..4ff81a98 100644 --- a/renderer/src/ui/icons/reload.jsx +++ b/renderer/src/ui/icons/reload.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class ReloadIcon extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - +export default function ReloadIcon(props) { + const size = props.size || "24px"; + return + + ; - } -} \ No newline at end of file +} diff --git a/renderer/src/ui/icons/save.jsx b/renderer/src/ui/icons/save.jsx index 89b023a9..5a02f66c 100644 --- a/renderer/src/ui/icons/save.jsx +++ b/renderer/src/ui/icons/save.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Save extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } -} \ No newline at end of file +export default function Save(props) { + const size = props.size || "24px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/search.jsx b/renderer/src/ui/icons/search.jsx index e9d7a2be..3a936e90 100644 --- a/renderer/src/ui/icons/search.jsx +++ b/renderer/src/ui/icons/search.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Search extends React.Component { - render() { - const size = this.props.size || "16px"; - return - - - ; - } -} \ No newline at end of file + export default function Search(props) { + const size = props.size || "16px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/support.jsx b/renderer/src/ui/icons/support.jsx index fbe7413b..732c6409 100644 --- a/renderer/src/ui/icons/support.jsx +++ b/renderer/src/ui/icons/support.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Support extends React.Component { - render() { - const size = this.props.size || "18px"; - return - - - ; - } -} \ No newline at end of file +export default function Support(props) { + const size = props.size || "18px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/theme.jsx b/renderer/src/ui/icons/theme.jsx index f2e9906a..cccae69b 100644 --- a/renderer/src/ui/icons/theme.jsx +++ b/renderer/src/ui/icons/theme.jsx @@ -1,11 +1,9 @@ import {React} from "modules"; -export default class Theme extends React.Component { - render() { - const size = this.props.size || "24px"; - return - - - ; - } -} \ No newline at end of file +export default function Theme(props) { + const size = props.size || "24px"; + return + + + ; +} diff --git a/renderer/src/ui/icons/twitch.jsx b/renderer/src/ui/icons/twitch.jsx index 1c7182c3..04a313d4 100644 --- a/renderer/src/ui/icons/twitch.jsx +++ b/renderer/src/ui/icons/twitch.jsx @@ -1,9 +1,8 @@ import {React} from "modules"; -export default class Twitch extends React.Component { - render() { - return - +export default function Twitch(props) { + const size = props.size || "18px"; + return + ; - } } \ No newline at end of file