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

Function getLeftStyles

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

Source from the content-addressed store, hash-verified

33};
34
35export const getLeftStyles = (
36 alignToTop: boolean,
37 description: Description,
38 isV3: boolean
39) => {
40 const stylesV3 = {
41 marginRight: 0,
42 marginLeft: 16,
43 alignSelf: alignToTop ? 'flex-start' : 'center',
44 };
45
46 if (!description) {
47 return {
48 ...styles.iconMarginLeft,
49 ...styles.marginVerticalNone,
50 ...(isV3 && { ...stylesV3 }),
51 };
52 }
53
54 if (!isV3) {
55 return styles.iconMarginLeft;
56 }
57
58 return {
59 ...styles.iconMarginLeft,
60 ...stylesV3,
61 };
62};
63
64export const getRightStyles = (
65 alignToTop: boolean,

Callers 3

ListItemFunction · 0.90
ListAccordionFunction · 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…