({
lineNumberStyle,
value
}: {
lineNumberStyle: TextStyle;
value?: number;
})
| 123 | const formattingSpecContext = createContext<FormattingSpecs>({} as any); |
| 124 | |
| 125 | function 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 | |
| 144 | const defaultLineNumberFormatter = (number: number) => |
| 145 | Number(number).toFixed(0); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…