2025-06-01 13:52:06 +07:00
|
|
|
import { getAssetIdByName } from '@revenge-mod/assets'
|
2025-05-10 18:17:47 +07:00
|
|
|
import { Design } from '@revenge-mod/discord/design'
|
2025-05-07 01:21:27 +07:00
|
|
|
|
|
|
|
|
import type { DiscordModules } from '@revenge-mod/discord/types'
|
|
|
|
|
|
2025-05-08 19:00:49 +07:00
|
|
|
export default function TableRowAssetIcon(props: TableRowAssetIconProps) {
|
2025-06-01 13:52:06 +07:00
|
|
|
return <Design.TableRow.Icon source={props.name ? getAssetIdByName(props.name)! : props.id!} {...props} />
|
2025-05-07 01:21:27 +07:00
|
|
|
}
|
|
|
|
|
|
2025-05-08 19:00:49 +07:00
|
|
|
export type TableRowAssetIconProps = Omit<DiscordModules.Components.TableRowIconProps, 'source'> &
|
2025-05-07 01:21:27 +07:00
|
|
|
(
|
|
|
|
|
| {
|
|
|
|
|
name: string
|
|
|
|
|
id?: never
|
|
|
|
|
}
|
|
|
|
|
| {
|
|
|
|
|
name?: never
|
|
|
|
|
id: number
|
|
|
|
|
}
|
|
|
|
|
)
|