GHHG10's picture
download
raw
782 Bytes
import type { Component, JSX } from "solid-js"
import { createMemo, splitProps } from "solid-js"
import sprite from "./provider-icons/sprite.svg"
import { iconNames, type IconName } from "./provider-icons/types"
export type ProviderIconProps = JSX.SVGElementTags["svg"] & {
id: string
}
export const ProviderIcon: Component<ProviderIconProps> = (props) => {
const [local, rest] = splitProps(props, ["id", "class", "classList"])
const resolved = createMemo(() => (iconNames.includes(local.id as IconName) ? local.id : "synthetic"))
return (
<svg
data-component="provider-icon"
{...rest}
classList={{
...local.classList,
[local.class ?? ""]: !!local.class,
}}
>
<use href={`${sprite}#${resolved()}`} />
</svg>
)
}

Xet Storage Details

Size:
782 Bytes
·
Xet hash:
79aa6f6a57fdfd2752ab77d24d97451d7d7363f6f6b66623c696222138a496ab

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.