MCPcopy
hub / github.com/callstack/react-native-paper / getButtonBorderColor

Function getButtonBorderColor

src/components/Button/utils.tsx:150–169  ·  view source on GitHub ↗
({ isMode, disabled, theme }: BaseProps)

Source from the content-addressed store, hash-verified

148};
149
150const getButtonBorderColor = ({ isMode, disabled, theme }: BaseProps) => {
151 if (theme.isV3) {
152 if (disabled && isMode('outlined')) {
153 return theme.colors.surfaceDisabled;
154 }
155
156 if (isMode('outlined')) {
157 return theme.colors.outline;
158 }
159 }
160
161 if (isMode('outlined')) {
162 return color(theme.dark ? white : black)
163 .alpha(0.29)
164 .rgb()
165 .string();
166 }
167
168 return 'transparent';
169};
170
171const getButtonBorderWidth = ({
172 isMode,

Callers 1

getButtonColorsFunction · 0.85

Calls 1

isModeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…