MCPcopy Create free account
hub / github.com/meliorence/react-native-render-html / Padding

Function Padding

apps/discovery/src/highlight/Highlighter.tsx:125–142  ·  view source on GitHub ↗
({
  lineNumberStyle,
  value
}: {
  lineNumberStyle: TextStyle;
  value?: number;
})

Source from the content-addressed store, hash-verified

123const formattingSpecContext = createContext<FormattingSpecs>({} as any);
124
125function Padding({
126 lineNumberStyle,
127 value
128}: {
129 lineNumberStyle: TextStyle;
130 value?: number;
131}) {
132 const { showLineNumbers } = useContext(formattingSpecContext);
133 if (!value) {
134 return null;
135 }
136 const { backgroundColor, width } = lineNumberStyle;
137 return (
138 <Text
139 style={[showLineNumbers && { backgroundColor }, { height: value, width }]}
140 />
141 );
142}
143
144const defaultLineNumberFormatter = (number: number) =>
145 Number(number).toFixed(0);

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…