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

Function addCustomColor

docs/src/components/DynamicColorTheme.tsx:193–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191 setCustomColors: React.Dispatch<React.SetStateAction<CustomColorEntry[]>>;
192}) => {
193 const addCustomColor = () => {
194 const newColor = {
195 key: `custom${++uniqColorKey}`,
196 name: `custom${customColors.length}`,
197 hex: defaultColor,
198 };
199 setCustomColors((colors) => [...colors, newColor]);
200 };
201
202 const setCustomColor = (key: string, hex: string) => {
203 setCustomColors((colors) =>

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…