From 236a1be31e47dbc6e5012a5cb15aabddc6ca770b Mon Sep 17 00:00:00 2001 From: MathieuG-P Date: Tue, 19 Jul 2022 18:36:16 +0200 Subject: [PATCH] add optional style --- .../components/svgs/bsm-icon.component.tsx | 41 ++++++++++--------- .../svgs/flags/france-icon.component.tsx | 6 ++- .../svgs/flags/spain-icon.component.tsx | 6 ++- .../svgs/flags/uk-icon.component.tsx | 6 ++- .../svgs/flags/usa-icon.component.tsx | 6 ++- .../svgs/icons/add-icon.component.tsx | 6 ++- .../svgs/icons/bs-note-fill.component.tsx | 5 ++- .../svgs/icons/copy-icon.component.tsx | 6 ++- .../svgs/icons/cross-icon.component.tsx | 6 ++- .../svgs/icons/desktop-icon.component.tsx | 6 ++- .../svgs/icons/favorite-icon.component.tsx | 5 ++- .../svgs/icons/folder-icon.component.tsx | 5 ++- .../svgs/icons/oculus-icon.component.tsx | 6 ++- .../svgs/icons/setting-icon.component.tsx | 6 ++- .../svgs/icons/steam-icon.component.tsx | 6 ++- .../svgs/icons/task-icon.component.tsx | 6 ++- .../svgs/icons/terminal-icon.component.tsx | 6 ++- .../svgs/icons/trash-icon.component.tsx | 6 ++- 18 files changed, 86 insertions(+), 54 deletions(-) diff --git a/src/renderer/components/svgs/bsm-icon.component.tsx b/src/renderer/components/svgs/bsm-icon.component.tsx index 38a9f23c..ae31d2f6 100644 --- a/src/renderer/components/svgs/bsm-icon.component.tsx +++ b/src/renderer/components/svgs/bsm-icon.component.tsx @@ -7,7 +7,7 @@ import { TerminalIcon } from "./icons/terminal-icon.component"; import { DesktopIcon } from "./icons/desktop-icon.component"; import { OculusIcon } from "./icons/oculus-icon.component"; import { AddIcon } from "./icons/add-icon.component"; -import CrossIcon from "./icons/cross-icon.component"; +import { CrossIcon } from "./icons/cross-icon.component"; import { FranceIcon } from "./flags/france-icon.component"; import { SpainIcon } from "./flags/spain-icon.component"; import { UsaIcon } from "./flags/usa-icon.component"; @@ -15,6 +15,7 @@ import { UkIcon } from "./flags/uk-icon.component"; import { TaskIcon } from "./icons/task-icon.component"; import { CopyIcon } from "./icons/copy-icon.component"; import { SteamIcon } from "./icons/steam-icon.component"; +import { CSSProperties } from "react"; export type BsmIconType = ( "settings"|"trash"|"favorite"|"folder"|"bsNote"| @@ -23,27 +24,27 @@ export type BsmIconType = ( "fr-FR-flag"|"es-ES-flag"|"en-US-flag"|"en-EN-flag" ); -export function BsmIcon({className, icon}: {className?: string, icon: BsmIconType}) { +export function BsmIcon({className, icon, style}: {className?: string, icon: BsmIconType, style?: CSSProperties}) { const renderIcon = () => { - if(icon === "settings"){ return } - if(icon === "trash"){ return } - if(icon === "favorite"){ return } - if(icon === "folder"){ return } - if(icon === "bsNote"){ return } - if(icon === "terminal"){ return } - if(icon === "desktop"){ return } - if(icon === "oculus"){ return } - if(icon === "add"){ return } - if(icon === "cross"){ return } - if(icon === "fr-FR-flag"){ return } - if(icon === "es-ES-flag"){ return } - if(icon === "en-US-flag"){ return } - if(icon === "en-EN-flag"){ return } - if(icon === "task"){ return } - if(icon === "copy"){ return } - if(icon === "steam"){ return } - return + if(icon === "settings"){ return } + if(icon === "trash"){ return } + if(icon === "favorite"){ return } + if(icon === "folder"){ return } + if(icon === "bsNote"){ return } + if(icon === "terminal"){ return } + if(icon === "desktop"){ return } + if(icon === "oculus"){ return } + if(icon === "add"){ return } + if(icon === "cross"){ return } + if(icon === "fr-FR-flag"){ return } + if(icon === "es-ES-flag"){ return } + if(icon === "en-US-flag"){ return } + if(icon === "en-EN-flag"){ return } + if(icon === "task"){ return } + if(icon === "copy"){ return } + if(icon === "steam"){ return } + return } return ( diff --git a/src/renderer/components/svgs/flags/france-icon.component.tsx b/src/renderer/components/svgs/flags/france-icon.component.tsx index b1bd32bd..40198fc5 100644 --- a/src/renderer/components/svgs/flags/france-icon.component.tsx +++ b/src/renderer/components/svgs/flags/france-icon.component.tsx @@ -1,6 +1,8 @@ -export function FranceIcon(props: {className: string}) { +import { CSSProperties } from "react"; + +export function FranceIcon(props: {className?: string, style?: CSSProperties}) { return ( - + diff --git a/src/renderer/components/svgs/flags/spain-icon.component.tsx b/src/renderer/components/svgs/flags/spain-icon.component.tsx index 4e87cd64..1adf9bb1 100644 --- a/src/renderer/components/svgs/flags/spain-icon.component.tsx +++ b/src/renderer/components/svgs/flags/spain-icon.component.tsx @@ -1,6 +1,8 @@ -export function SpainIcon(props: {className: string}) { +import { CSSProperties } from "react"; + +export function SpainIcon(props: {className?: string, style?: CSSProperties}) { return ( - + diff --git a/src/renderer/components/svgs/flags/uk-icon.component.tsx b/src/renderer/components/svgs/flags/uk-icon.component.tsx index 01d76b6b..a77d3e18 100644 --- a/src/renderer/components/svgs/flags/uk-icon.component.tsx +++ b/src/renderer/components/svgs/flags/uk-icon.component.tsx @@ -1,6 +1,8 @@ -export function UkIcon(props: {className: string}) { +import { CSSProperties } from "react"; + +export function UkIcon(props: {className?: string, style?: CSSProperties}) { return ( - + diff --git a/src/renderer/components/svgs/flags/usa-icon.component.tsx b/src/renderer/components/svgs/flags/usa-icon.component.tsx index 1aa70d44..31220cc5 100644 --- a/src/renderer/components/svgs/flags/usa-icon.component.tsx +++ b/src/renderer/components/svgs/flags/usa-icon.component.tsx @@ -1,6 +1,8 @@ -export function UsaIcon(props: {className: string}) { +import { CSSProperties } from "react"; + +export function UsaIcon(props: {className?: string, style?: CSSProperties}) { return ( - + diff --git a/src/renderer/components/svgs/icons/add-icon.component.tsx b/src/renderer/components/svgs/icons/add-icon.component.tsx index 48ea0ba7..d0769a01 100644 --- a/src/renderer/components/svgs/icons/add-icon.component.tsx +++ b/src/renderer/components/svgs/icons/add-icon.component.tsx @@ -1,6 +1,8 @@ -export function AddIcon(props: {className: string}) { +import { CSSProperties } from "react"; + +export function AddIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/bs-note-fill.component.tsx b/src/renderer/components/svgs/icons/bs-note-fill.component.tsx index eda41237..90e9d853 100644 --- a/src/renderer/components/svgs/icons/bs-note-fill.component.tsx +++ b/src/renderer/components/svgs/icons/bs-note-fill.component.tsx @@ -1,9 +1,10 @@ +import { CSSProperties } from "react"; -export function BsNoteFill({className}: {className: string}) { +export function BsNoteFill(props: {className?: string, style?: CSSProperties}) { return ( - + diff --git a/src/renderer/components/svgs/icons/copy-icon.component.tsx b/src/renderer/components/svgs/icons/copy-icon.component.tsx index 4ad4ef40..a2cef147 100644 --- a/src/renderer/components/svgs/icons/copy-icon.component.tsx +++ b/src/renderer/components/svgs/icons/copy-icon.component.tsx @@ -1,6 +1,8 @@ -export function CopyIcon(props: {className?: string}) { +import { CSSProperties } from "react"; + +export function CopyIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/cross-icon.component.tsx b/src/renderer/components/svgs/icons/cross-icon.component.tsx index 4defa13e..517e74b4 100644 --- a/src/renderer/components/svgs/icons/cross-icon.component.tsx +++ b/src/renderer/components/svgs/icons/cross-icon.component.tsx @@ -1,6 +1,8 @@ -export default function CrossIcon(props: {className: string}){ +import { CSSProperties } from "react"; + +export function CrossIcon(props: {className?: string, style?: CSSProperties}){ return ( - + ) diff --git a/src/renderer/components/svgs/icons/desktop-icon.component.tsx b/src/renderer/components/svgs/icons/desktop-icon.component.tsx index b16728fd..69244169 100644 --- a/src/renderer/components/svgs/icons/desktop-icon.component.tsx +++ b/src/renderer/components/svgs/icons/desktop-icon.component.tsx @@ -1,6 +1,8 @@ -export function DesktopIcon(props: {className: string}) { +import { CSSProperties } from "react"; + +export function DesktopIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/favorite-icon.component.tsx b/src/renderer/components/svgs/icons/favorite-icon.component.tsx index ede2ae9b..f5adfaa8 100644 --- a/src/renderer/components/svgs/icons/favorite-icon.component.tsx +++ b/src/renderer/components/svgs/icons/favorite-icon.component.tsx @@ -1,7 +1,8 @@ +import { CSSProperties } from "react"; -export function FavoriteIcon(props: {className: string}) { +export function FavoriteIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/folder-icon.component.tsx b/src/renderer/components/svgs/icons/folder-icon.component.tsx index 19d79ae6..d0629f12 100644 --- a/src/renderer/components/svgs/icons/folder-icon.component.tsx +++ b/src/renderer/components/svgs/icons/folder-icon.component.tsx @@ -1,7 +1,8 @@ +import { CSSProperties } from "react"; -export function FolderIcon(props: {className: string}) { +export function FolderIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/oculus-icon.component.tsx b/src/renderer/components/svgs/icons/oculus-icon.component.tsx index 3b77e95f..932fc1b1 100644 --- a/src/renderer/components/svgs/icons/oculus-icon.component.tsx +++ b/src/renderer/components/svgs/icons/oculus-icon.component.tsx @@ -1,6 +1,8 @@ -export function OculusIcon(props: {className?: string}) { +import { CSSProperties } from "react"; + +export function OculusIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/setting-icon.component.tsx b/src/renderer/components/svgs/icons/setting-icon.component.tsx index 682557e1..f46e4d20 100644 --- a/src/renderer/components/svgs/icons/setting-icon.component.tsx +++ b/src/renderer/components/svgs/icons/setting-icon.component.tsx @@ -1,6 +1,8 @@ -export function SettingIcon(props: {className?: string}) { +import { CSSProperties } from "react"; + +export function SettingIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/steam-icon.component.tsx b/src/renderer/components/svgs/icons/steam-icon.component.tsx index ea03584f..b27e04d3 100644 --- a/src/renderer/components/svgs/icons/steam-icon.component.tsx +++ b/src/renderer/components/svgs/icons/steam-icon.component.tsx @@ -1,6 +1,8 @@ -export function SteamIcon({className}: {className: string}) { +import { CSSProperties } from "react"; + +export function SteamIcon(props: {className?: string, style?: CSSProperties}) { return ( - + diff --git a/src/renderer/components/svgs/icons/task-icon.component.tsx b/src/renderer/components/svgs/icons/task-icon.component.tsx index d02c002c..8ce49519 100644 --- a/src/renderer/components/svgs/icons/task-icon.component.tsx +++ b/src/renderer/components/svgs/icons/task-icon.component.tsx @@ -1,6 +1,8 @@ -export function TaskIcon(props: {className?: string}) { +import { CSSProperties } from "react"; + +export function TaskIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/terminal-icon.component.tsx b/src/renderer/components/svgs/icons/terminal-icon.component.tsx index c215f020..8197da1e 100644 --- a/src/renderer/components/svgs/icons/terminal-icon.component.tsx +++ b/src/renderer/components/svgs/icons/terminal-icon.component.tsx @@ -1,6 +1,8 @@ -export function TerminalIcon(props: {className?: string}) { +import { CSSProperties } from "react"; + +export function TerminalIcon(props: {className?: string, style?: CSSProperties}) { return ( - + ) diff --git a/src/renderer/components/svgs/icons/trash-icon.component.tsx b/src/renderer/components/svgs/icons/trash-icon.component.tsx index 68caade5..b6334991 100644 --- a/src/renderer/components/svgs/icons/trash-icon.component.tsx +++ b/src/renderer/components/svgs/icons/trash-icon.component.tsx @@ -1,6 +1,8 @@ -export function TrashIcon(props: {className?: string}) { +import { CSSProperties } from "react"; + +export function TrashIcon(props: {className?: string, style?: CSSProperties}) { return ( - + )