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

Function getRightStyles

src/components/List/utils.ts:64–90  ·  view source on GitHub ↗
(
  alignToTop: boolean,
  description: Description,
  isV3: boolean
)

Source from the content-addressed store, hash-verified

62};
63
64export const getRightStyles = (
65 alignToTop: boolean,
66 description: Description,
67 isV3: boolean
68) => {
69 const stylesV3 = {
70 marginLeft: 16,
71 alignSelf: alignToTop ? 'flex-start' : 'center',
72 };
73
74 if (!description) {
75 return {
76 ...styles.iconMarginRight,
77 ...styles.marginVerticalNone,
78 ...(isV3 && { ...stylesV3 }),
79 };
80 }
81
82 if (!isV3) {
83 return styles.iconMarginRight;
84 }
85
86 return {
87 ...styles.iconMarginRight,
88 ...stylesV3,
89 };
90};
91
92const styles = StyleSheet.create({
93 marginVerticalNone: { marginVertical: 0 },

Callers 2

ListItemFunction · 0.90
ListUtils.test.tsxFile · 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…