import * as React from "react"; import { View, ImageSourcePropType, StyleProp, ViewStyle } from "react-native"; import Icon from "./Icon"; import Touchable from "./Touchable"; import CircleImage from "./CircleImage"; import { withTheme } from "../core/theming"; import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from "../core/component-types"; import theme from "../styles/DefaultTheme"; type Props = { image: string | ImageSourcePropType; size?: number; onPress?: () => void; style?: StyleProp; theme: typeof theme; }; const AvatarEdit: React.FC = ({ image, size = 80, onPress = () => {}, style, theme: { colors }, ...rest }) => { const colorStyles = { editBackgroundColor: colors.primary, editIconColor: colors.surface, editBorderColor: colors.surface, }; const dimensions = { width: size, height: size, }; return ( ); }; export default withTheme(AvatarEdit); export const SEED_DATA = { name: "Avatar Edit", tag: "AvatarEdit", description: "An avatar with an edit icon in the top right", category: COMPONENT_TYPES.deprecated, layout: { width: 64, height: 64, }, props: { size: { group: GROUPS.basic, label: "Size", description: "Size of avatar / width, height", editable: true, required: false, formType: FORM_TYPES.number, propType: PROP_TYPES.NUMBER, min: 0, max: 300, precision: 0, step: 1, defaultValue: 80, }, image: { group: GROUPS.data, label: "Image", description: "Name of the image", editable: true, required: true, formType: FORM_TYPES.image, propType: PROP_TYPES.ASSET, defaultValue: "brightness-5", }, }, };