mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
export ogg icon
This commit is contained in:
parent
71cc3938b1
commit
a92de80121
@ -4,6 +4,7 @@ import VrChatIcon from "./customIcons/vrchat"
|
||||
import VerifiedBadge from "./customIcons/verifiedBadge"
|
||||
import Crown from "./customIcons/crown"
|
||||
import Lossless from "./customIcons/lossless"
|
||||
import Ogg from "./customIcons/ogg"
|
||||
|
||||
// import icons lib
|
||||
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"
|
||||
|
||||
const marginedStyle = {
|
||||
width: "1em",
|
||||
height: "1em",
|
||||
marginRight: "10px",
|
||||
verticalAlign: "-0.125em"
|
||||
width: "1em",
|
||||
height: "1em",
|
||||
marginRight: "10px",
|
||||
verticalAlign: "-0.125em",
|
||||
}
|
||||
|
||||
const customs = {
|
||||
Lossless: (props) => <Lossless
|
||||
style={marginedStyle}
|
||||
{...props}
|
||||
/>,
|
||||
verifiedBadge: (props) => <VerifiedBadge
|
||||
style={marginedStyle}
|
||||
{...props}
|
||||
/>,
|
||||
VrChat: (props) => <VrChatIcon
|
||||
style={marginedStyle}
|
||||
{...props}
|
||||
/>,
|
||||
Crown: (props) => <Crown
|
||||
style={marginedStyle}
|
||||
{...props}
|
||||
/>
|
||||
Lossless: (props) => <Lossless style={marginedStyle} {...props} />,
|
||||
verifiedBadge: (props) => (
|
||||
<VerifiedBadge style={marginedStyle} {...props} />
|
||||
),
|
||||
VrChat: (props) => <VrChatIcon style={marginedStyle} {...props} />,
|
||||
Crown: (props) => <Crown style={marginedStyle} {...props} />,
|
||||
Ogg: (props) => <Ogg style={marginedStyle} {...props} />,
|
||||
}
|
||||
|
||||
export const Icons = {
|
||||
...customs,
|
||||
...lib1,
|
||||
...lib2,
|
||||
...lib3,
|
||||
...lib4,
|
||||
...lib5,
|
||||
...lib6,
|
||||
...lib7,
|
||||
...customs,
|
||||
...lib1,
|
||||
...lib2,
|
||||
...lib3,
|
||||
...lib4,
|
||||
...lib5,
|
||||
...lib6,
|
||||
...lib7,
|
||||
}
|
||||
|
||||
export function createIconRender(icon, props) {
|
||||
if (React.isValidElement(icon)) {
|
||||
return icon
|
||||
}
|
||||
if (React.isValidElement(icon)) {
|
||||
return icon
|
||||
}
|
||||
|
||||
if (typeof Icons[icon] !== "undefined") {
|
||||
return React.createElement(Icons[icon], props)
|
||||
}
|
||||
if (typeof Icons[icon] !== "undefined") {
|
||||
return React.createElement(Icons[icon], props)
|
||||
}
|
||||
|
||||
return null
|
||||
return null
|
||||
}
|
||||
|
||||
export default Icons
|
Loading…
x
Reference in New Issue
Block a user