UNPKG

@metamask/design-system-react-native

Version:
1 lines 1.73 kB
{"version":3,"file":"AvatarBase.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarBase/AvatarBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { AvatarBaseSize, AvatarBaseShape } from '../../types';\nimport type { TextProps } from '../Text';\n\n/**\n * AvatarBase component props.\n */\nexport type AvatarBaseProps = {\n /**\n * Required prop for the content to be rendered within the AvatarBase\n */\n children?: React.ReactNode;\n /**\n * Optional prop to control the size of the AvatarBase\n * Possible values:\n * AvatarBaseSize.Xs (16px),\n * - AvatarBaseSize.Sm (24px),\n * - AvatarBaseSize.Md (32px).\n * - AvatarBaseSize.Lg (40px),\n * - AvatarBaseSize.Xl (48px),\n *\n * @default AvatarBaseSize.Md\n */\n size?: AvatarBaseSize;\n /**\n * Optional prop to control the shape of the AvatarBase\n * Possible values:\n * - AvatarBaseShape.Circle\n * - AvatarBaseShape.Square\n *\n * @default AvatarBaseShape.Circle\n */\n shape?: AvatarBaseShape;\n /**\n * Optional text to be rendered when the content fails to render\n */\n fallbackText?: string;\n /**\n * Optional props to be passed to the fallbackText when the content\n * fails to render\n */\n fallbackTextProps?: Omit<TextProps, 'children'>;\n /**\n * Optional prop to include the border with the Avatar.\n * For internal use only\n *\n * @default false\n */\n hasBorder?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & ViewProps;\n"]}