mirror of
https://github.com/balzack/databag.git
synced 2025-02-15 21:19:16 +00:00
adding interface to color mode
This commit is contained in:
parent
68203bad52
commit
a0b07bfed8
@ -1,4 +1,6 @@
|
|||||||
export const LightColors = {
|
import { Appearance } from 'react-native'
|
||||||
|
|
||||||
|
const LightColors = {
|
||||||
tabBar: '#448866',
|
tabBar: '#448866',
|
||||||
activeTabIcon: '#ffffff',
|
activeTabIcon: '#ffffff',
|
||||||
idleTabIcon: '#cccccc',
|
idleTabIcon: '#cccccc',
|
||||||
@ -23,12 +25,13 @@ export const LightColors = {
|
|||||||
confirmedIndicator: '#88bb00',
|
confirmedIndicator: '#88bb00',
|
||||||
unknownIndicator: '#dddddd',
|
unknownIndicator: '#dddddd',
|
||||||
errorIndicator: '#ffaaaa',
|
errorIndicator: '#ffaaaa',
|
||||||
divider: '#eeeeee',
|
horizontalDivider: '#eeeeee',
|
||||||
|
verticalDivider: '#aaaaaa'
|
||||||
unreadIndicator: '#00aa00',
|
unreadIndicator: '#00aa00',
|
||||||
disconnectedIndicator: '#aa0000',
|
disconnectedIndicator: '#aa0000',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DarkColors = {
|
const DarkColors = {
|
||||||
tabBar: '#111111',
|
tabBar: '#111111',
|
||||||
activeTabIcon: '#dddddd',
|
activeTabIcon: '#dddddd',
|
||||||
idleTabIcon: '#aaaaaa',
|
idleTabIcon: '#aaaaaa',
|
||||||
@ -53,12 +56,46 @@ export const DarkColors = {
|
|||||||
confirmedIndicator: '#88bb00',
|
confirmedIndicator: '#88bb00',
|
||||||
unknownIndicator: '#dddddd',
|
unknownIndicator: '#dddddd',
|
||||||
errorIndicator: '#ffaaaa',
|
errorIndicator: '#ffaaaa',
|
||||||
divider: '#888888',
|
horizonalDivider: '#888888',
|
||||||
|
verticalDivider: '#aaaaaa',
|
||||||
unreadIndicator: '#00aa00',
|
unreadIndicator: '#00aa00',
|
||||||
disconnectedIndicator: '#aa0000',
|
disconnectedIndicator: '#aa0000',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getColor(label) {
|
||||||
|
return Appearance.getColorsScheme() === 'dark' ? DarkColors[label] : LightColors[label];
|
||||||
|
}
|
||||||
|
|
||||||
export const Colors = {
|
export const Colors = {
|
||||||
|
tabBar: getColor('tabBar'),
|
||||||
|
activeTabIcon: getColor('activeTabIcon'),
|
||||||
|
idleTabIcon: getColor('idleTabIcon'),
|
||||||
|
linkText: getColor('linkText'),
|
||||||
|
dangerText: getColor('dangerText'),
|
||||||
|
labelText: getColor('labelText'),
|
||||||
|
iconText: getColor('iconText'),
|
||||||
|
unsetText: getColor('unsetText'),
|
||||||
|
descriptionText: getColor('descriptionText'),
|
||||||
|
text: getColor('text'),
|
||||||
|
screenBase: getColor('screenBase'),
|
||||||
|
areaBase: getColor('areaBase'),
|
||||||
|
headerBar getColor('headerBar'),
|
||||||
|
primaryButton: getColor('primaryButton'),
|
||||||
|
inputBase: getColor('inputBase'),
|
||||||
|
inputPlaceholder: getColor('inputPlaceholder'),
|
||||||
|
inputText: getColor('inputText'),
|
||||||
|
connectedIndicator: getColor('connectedIndicator'),
|
||||||
|
connectingIndicator: getColor('connectingIndicator'),
|
||||||
|
requestedIndicator: getColor('requestedIndicator'),
|
||||||
|
pendingIndicator: getColor('pendingIndicator'),
|
||||||
|
confirmedIndicator: getColor('confirmedIndicator'),
|
||||||
|
unknownIndicator: getColor('unknownIndicator'),
|
||||||
|
errorIndicator: getColor('errorIndicator'),
|
||||||
|
horizonalDivider: getColor('horizontalDivider'),
|
||||||
|
verticalDivider: getColor('verticalDivider'),
|
||||||
|
unreadIndicator: getColor('unreadIndicator'),
|
||||||
|
disconnectedIndicator: getColor('disconnectedIndicator'),
|
||||||
|
|
||||||
background: '#8fbea7',
|
background: '#8fbea7',
|
||||||
primary: '#448866',
|
primary: '#448866',
|
||||||
titleBackground: '#f6f6f6',
|
titleBackground: '#f6f6f6',
|
||||||
|
Loading…
Reference in New Issue
Block a user