export ogg icon

This commit is contained in:
SrGooglo 2025-05-21 18:56:06 +00:00
parent 71cc3938b1
commit a92de80121

View File

@ -4,6 +4,7 @@ import VrChatIcon from "./customIcons/vrchat"
import VerifiedBadge from "./customIcons/verifiedBadge" import VerifiedBadge from "./customIcons/verifiedBadge"
import Crown from "./customIcons/crown" import Crown from "./customIcons/crown"
import Lossless from "./customIcons/lossless" import Lossless from "./customIcons/lossless"
import Ogg from "./customIcons/ogg"
// import icons lib // import icons lib
import * as lib1 from "react-icons/fi" import * as lib1 from "react-icons/fi"
@ -15,52 +16,43 @@ import * as lib6 from "react-icons/fa"
import * as lib7 from "react-icons/tb" import * as lib7 from "react-icons/tb"
const marginedStyle = { const marginedStyle = {
width: "1em", width: "1em",
height: "1em", height: "1em",
marginRight: "10px", marginRight: "10px",
verticalAlign: "-0.125em" verticalAlign: "-0.125em",
} }
const customs = { const customs = {
Lossless: (props) => <Lossless Lossless: (props) => <Lossless style={marginedStyle} {...props} />,
style={marginedStyle} verifiedBadge: (props) => (
{...props} <VerifiedBadge style={marginedStyle} {...props} />
/>, ),
verifiedBadge: (props) => <VerifiedBadge VrChat: (props) => <VrChatIcon style={marginedStyle} {...props} />,
style={marginedStyle} Crown: (props) => <Crown style={marginedStyle} {...props} />,
{...props} Ogg: (props) => <Ogg style={marginedStyle} {...props} />,
/>,
VrChat: (props) => <VrChatIcon
style={marginedStyle}
{...props}
/>,
Crown: (props) => <Crown
style={marginedStyle}
{...props}
/>
} }
export const Icons = { export const Icons = {
...customs, ...customs,
...lib1, ...lib1,
...lib2, ...lib2,
...lib3, ...lib3,
...lib4, ...lib4,
...lib5, ...lib5,
...lib6, ...lib6,
...lib7, ...lib7,
} }
export function createIconRender(icon, props) { export function createIconRender(icon, props) {
if (React.isValidElement(icon)) { if (React.isValidElement(icon)) {
return icon return icon
} }
if (typeof Icons[icon] !== "undefined") { if (typeof Icons[icon] !== "undefined") {
return React.createElement(Icons[icon], props) return React.createElement(Icons[icon], props)
} }
return null return null
} }
export default Icons export default Icons