mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 16:02:19 +00:00
wip(desktop): progress
This commit is contained in:
parent
91d743ef9a
commit
190fa4c87a
12 changed files with 201 additions and 126 deletions
|
|
@ -4,11 +4,11 @@ import sprite from "./provider-icons/sprite.svg"
|
|||
import type { IconName } from "./provider-icons/types"
|
||||
|
||||
export type ProviderIconProps = JSX.SVGElementTags["svg"] & {
|
||||
name: IconName
|
||||
id: IconName
|
||||
}
|
||||
|
||||
export const ProviderIcon: Component<ProviderIconProps> = (props) => {
|
||||
const [local, rest] = splitProps(props, ["name", "class", "classList"])
|
||||
const [local, rest] = splitProps(props, ["id", "class", "classList"])
|
||||
return (
|
||||
<svg
|
||||
data-component="provider-icon"
|
||||
|
|
@ -18,7 +18,7 @@ export const ProviderIcon: Component<ProviderIconProps> = (props) => {
|
|||
[local.class ?? ""]: !!local.class,
|
||||
}}
|
||||
>
|
||||
<use href={`${sprite}#${local.name}`} />
|
||||
<use href={`${sprite}#${local.id}`} />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue