How to use the co/collections/utils/color 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 / screens / collection / sharing / add / index.js View on Github external
static options({_id}) {
        return {
            style: 'form',
            tintColor: color(_id),
            
            topBar: {
                title: {
                    text: t.s('inviteMorePeople')
                }
            },

            animations: {
				push: {
                    waitForRender: true,
				}
			}
        }
    }
github raindropio / mobile / src / screens / extension / save / view / index.js View on Github external
render() {
        const {item, status, message, collection, onAddTags, onToggleImportant, onEdit, onClose, onTryAgain} = this.props
        const color = collectionColor(collection._id)

        let content = null, dismissEnabled = true, showBody = true
    
        switch(status){
            case 'error': 
                dismissEnabled = false
                content = (
                    
                        <title>{message||t.s('error')}</title>
                        {/*{t.s('tryAgain')}*/}
                        {this.closeButton}
                    
                )
            break;
    
            case 'notFound':
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 / screens / bookmarks / search / index.js View on Github external
static options = ({spaceId=0})=>({
		tintColor: color(parseInt(spaceId)),

		modalPresentationStyle: 'pageSheet',
		
		topBar: {
			animate: false,
			visible: false,
			drawBehind: true
		},

		bottomTab: {
			icon: require('assets/images/tab/search.png'),
			text: t.s('defaultCollection-0')
		}
	})
github raindropio / mobile / src / screens / bookmark / add / save / index.js View on Github external
static options({collectionId}) {
		return {
			tintColor: color(collectionId),
			topBar: {
				title: {
					text: t.s('uploadProgress')
				}
			}
		}
	}
github raindropio / mobile / src / screens / collection / edit / index.js View on Github external
static options({_id}) {
		return {
			style: 'form',
			tintColor: color(_id),

			topBar: {
				title: {
					text: t.s('collection')
				},
				...doneButton
			},

			animations: {
				push: {
                    waitForRender: true,
				}
			}
		}
	}
github raindropio / mobile / src / co / bookmarks / item / index.js View on Github external
openBookmark = (options={})=>{
		Navigation.openURL({
			componentId: this.props.componentId,
			...options
		}, {
			browser: options.reactTag ? 'default' : '',
			link: this.props.item.link,
			iconColor: themed._tintColor(collectionColor(this.props.item.collectionId))
		})
	}
github raindropio / mobile / src / screens / collection / sharing / list / index.js View on Github external
static options({_id}) {
        return {
            tintColor: color(_id),
            
            topBar: {
                title: {
                    text: t.s('members')
                }
            }
        }
    }
github raindropio / mobile / src / screens / bookmark / add / home / index.js View on Github external
static options({collectionId}) {
		return {
			style: 'form',
			tintColor: color(collectionId),
			topBar: {
				title: {
					text: t.s('newBookmark')
				}
			}
		}
	}
github raindropio / mobile / src / screens / bookmarks / browse / index.js View on Github external
const getOptions = ({ spaceId })=>({
	tintColor: color(spaceId),

	topBar: {
		title: {
			component: {
				name: 'bookmarks/title',
				alignment: Platform.OS == 'ios' ? 'center' : 'fill',

				passProps: {
					spaceId
				}
			}
		},

		rightButtons: [
			...(
				spaceId != -99 ? [{