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

Function AdditionalColor

docs/src/components/DynamicColorTheme.tsx:108–141  ·  view source on GitHub ↗
({
  color,
  base,
  setColor,
  children,
}: AdditionalColorPickerProps)

Source from the content-addressed store, hash-verified

106};
107
108const AdditionalColor = ({
109 color,
110 base,
111 setColor,
112 children,
113}: AdditionalColorPickerProps) => {
114 const custom = color && color !== base;
115
116 if (custom) {
117 return (
118 <tr>
119 <td>{children} (custom)</td>
120 <td>
121 <ColorPicker color={color} setColor={setColor} additional />
122 <button
123 className="color-picker-button-cancel"
124 onClick={() => setColor(undefined)}
125 >
126
127 </button>
128 </td>
129 </tr>
130 );
131 }
132
133 return (
134 <tr>
135 <td>{children}</td>
136 <td>
137 <ColorPicker color={base} setColor={setColor} />
138 </td>
139 </tr>
140 );
141};
142
143const CodePreview = ({
144 theme,

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…