MCPcopy Create free account
hub / github.com/callstack/react-native-paper / onTextLayout

Function onTextLayout

src/components/Drawer/DrawerCollapsedItem.tsx:153–157  ·  view source on GitHub ↗
({
    nativeEvent,
  }: NativeSyntheticEvent<TextLayoutEventData>)

Source from the content-addressed store, hash-verified

151 : theme.colors.onSurfaceVariant;
152
153 const onTextLayout = ({
154 nativeEvent,
155 }: NativeSyntheticEvent<TextLayoutEventData>) => {
156 setNumOfLines(nativeEvent.lines.length);
157 };
158
159 // Label is cut off on Android, when centered "labelMedium" text
160 // has more than 4 lines, so there is a need to decrease the letter spacing.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…