( colorName: string, theme: Record<string, any> )
| 127 | }; |
| 128 | |
| 129 | export const getMatchingColor = ( |
| 130 | colorName: string, |
| 131 | theme: Record<string, any> |
| 132 | ) => { |
| 133 | if (colorName === 'outline') { |
| 134 | return theme.surface; |
| 135 | } |
| 136 | |
| 137 | if (colorName.startsWith('on')) { |
| 138 | const key = camelCase(colorName.slice(2)); |
| 139 | return theme[key]; |
| 140 | } |
| 141 | |
| 142 | const key = `on${camelCase(colorName, { pascalCase: true })}`; |
| 143 | return theme[key]; |
| 144 | }; |
| 145 | |
| 146 | const prepareCustomColors = ( |
| 147 | type: 'light' | 'dark', |
no outgoing calls
no test coverage detected
searching dependent graphs…