1import { borderRadius, iconSize } from '@expo/styleguide-native'; 2import { Image as RNImage } from 'react-native'; 3 4import { create } from './create-primitive'; 5import { scale } from './theme'; 6 7export const Image = create(RNImage, { 8 base: { 9 resizeMode: 'cover', 10 }, 11 12 variants: { 13 size: { 14 tiny: { 15 height: scale.small, 16 width: scale.small, 17 }, 18 small: { 19 height: iconSize.small, 20 width: iconSize.small, 21 }, 22 23 large: { 24 height: iconSize.large, 25 width: iconSize.large, 26 }, 27 28 xl: { 29 height: scale.xl, 30 width: scale.xl, 31 }, 32 }, 33 34 rounded: { 35 small: { borderRadius: borderRadius.small }, 36 medium: { borderRadius: borderRadius.medium }, 37 large: { borderRadius: borderRadius.large }, 38 huge: { borderRadius: borderRadius.huge }, 39 full: { borderRadius: 99999 }, 40 }, 41 }, 42}); 43