4 lines
114 B
TypeScript
4 lines
114 B
TypeScript
export function imageSrc(src: string) {
|
|
return src.startsWith('http') ? `url(${src})` : `url(/images/${src})`
|
|
}
|