MCPcopy
hub / github.com/callstack/react-native-paper / calculateInputHeight

Function calculateInputHeight

src/components/TextInput/helpers.tsx:63–72  ·  view source on GitHub ↗
(
  labelHeight: number,
  height: any = 0,
  minHeight: number
)

Source from the content-addressed store, hash-verified

61};
62
63export const calculateInputHeight = (
64 labelHeight: number,
65 height: any = 0,
66 minHeight: number
67): number => {
68 const finalHeight = height > 0 ? height : labelHeight;
69
70 if (height > 0) return height;
71 return finalHeight < minHeight ? minHeight : finalHeight;
72};
73
74export const calculatePadding = (props: PaddingProps): number => {
75 const { height, multiline = false } = props;

Callers 2

TextInputFlatFunction · 0.90
TextInputOutlinedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…