How to use the co/style/colors.themed.main function in co

To help you get started, we’ve selected a few co examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github raindropio / mobile / src / modules / navigation / browser.js View on Github external
export const openURL = (props, {browser, link, fromBottom=false, barColor=themed.main(), iconColor=themed.tintColor()})=>{
	const protoRegex = /^(https|http|ftp)?/

	switch(browser || store.getState().local.browser) {
		case 'system':
			Linking.openURL(link)
		break

		case 'ios.chrome':
			Linking.openURL(link.replace(protoRegex, 'googlechrome'))
		break

		case 'ios.firefox':
			Linking.openURL('firefox://open-url?url='+link)
		break

		case 'ios.firefox-focus':
github raindropio / mobile / src / co / screen / styles / base.js View on Github external
export default ()=>({
    statusBar: {
        style: (themeIsDark() ? 'light' : 'dark'),
        ...(
            (Platform.OS=='android' && Platform.Version >= 23) ? 
                {backgroundColor: themed.main()} : {}
        )
    },
    topBar: {
        background: {
            color: themed.main(),
            translucent: false,
            blur: false
        },
        
        leftButtonColor: themed.tintColor(),
        rightButtonColor: themed.tintColor(),
        
        barStyle: themeIsDark() ? 'black' : 'default',
        borderColor: themed.invertedLight(),
        //borderHeight: 1,
        noBorder: true,
        elevation: 0,
        
        title: {
            color: themed.inverted(),
            fontSize: fontSize.topBar(),
github raindropio / mobile / src / co / screen / styles / base.js View on Github external
},
        backButton: {
            color: themed.tintColor(),
            icon: require('assets/images/backButton.png'),
            showTitle: false
        }
    },
    ...Platform.select({
        ios: {
            screenBackgroundColor: themed.main(),
        }
    }),
    layout: {
        ...Platform.select({
            ios: {
                backgroundColor: themed.main()
            },
            android: {
                componentBackgroundColor: themed.main() //performance improvement
            }
        })
    },
    overlay: {
        interceptTouchOutside: false
    },
    bottomTabs: {
        translucent: true, //iOS important, otherwise is drawen above content!!
        animate: false,
        barStyle: themeIsDark() ? 'black' : 'default',
        backgroundColor: themed.main(),
        titleDisplayMode: 'alwaysShow',
        elevation: 22,
github raindropio / mobile / src / co / common / icon / style.js View on Github external
export const DefaultIconImage = styled(IconImage).attrs(props=>({
	tintColor: props.theme.itemSelected ? (props.theme.dark ? themed.main(props) : 'white') : colors.asphalt
}))``
github raindropio / mobile / src / screens / extension / save / view / style.js View on Github external
    background: ${({color, theme})=>color || (theme.dark ? themed.main() : themed.tintColor())};
    ${({show})=>{
github raindropio / mobile / src / co / bookmarks / actions / open.js View on Github external
export default (options, {link, type, collectionId})=>{
	openURL(options, {
		link,
		readerMode: type=='article',
		barColor: themed.main(),
		iconColor: themed._tintColor(collectionColor(collectionId))
	})
}
github raindropio / mobile / src / co / screen / styles / base.js View on Github external
})
        },

        subtitle: {
            color: themed.invertedDark(),
            fontSize: 13,
        },
        backButton: {
            color: themed.tintColor(),
            icon: require('assets/images/backButton.png'),
            showTitle: false
        }
    },
    ...Platform.select({
        ios: {
            screenBackgroundColor: themed.main(),
        }
    }),
    layout: {
        ...Platform.select({
            ios: {
                backgroundColor: themed.main()
            },
            android: {
                componentBackgroundColor: themed.main() //performance improvement
            }
        })
    },
    overlay: {
        interceptTouchOutside: false
    },
    bottomTabs: {
github raindropio / mobile / src / co / screen / styles / base.js View on Github external
icon: require('assets/images/backButton.png'),
            showTitle: false
        }
    },
    ...Platform.select({
        ios: {
            screenBackgroundColor: themed.main(),
        }
    }),
    layout: {
        ...Platform.select({
            ios: {
                backgroundColor: themed.main()
            },
            android: {
                componentBackgroundColor: themed.main() //performance improvement
            }
        })
    },
    overlay: {
        interceptTouchOutside: false
    },
    bottomTabs: {
        translucent: true, //iOS important, otherwise is drawen above content!!
        animate: false,
        barStyle: themeIsDark() ? 'black' : 'default',
        backgroundColor: themed.main(),
        titleDisplayMode: 'alwaysShow',
        elevation: 22,

        ...Platform.select({
            ios: {
github raindropio / mobile / src / co / style / section.js View on Github external
background-color: ${props=>{
		if (props.theme.sectionActive === true)
			return props.theme.dark ? themed.invertedLight(props) : props.theme.tintColor || themed.tintColor(props)

		return (props.theme.backgroundColor || themed.main(props))
	}};
	border-bottom-color: ${themed.invertedLight};