UNPKG

@prefecthq/prefect-ui-library

Version:

This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.

14 lines (11 loc) 428 B
import { MockFunction } from '@/services/Mocker' type RandomImageSize = number | { width: number, height: number } export const randomImage: MockFunction<string, [RandomImageSize?]> = function(size) { let width = 100 let height = 100 if (size) { width = typeof size === 'number' ? size : size.width height = typeof size === 'number' ? size : size.height } return `https://picsum.photos/${width}/${height}` }