How to use the cozy-ui/transpiled/react/palette.dodgerBlue function in cozy-ui

To help you get started, we’ve selected a few cozy-ui 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 cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / BillAction.jsx View on Github external
if (!doctype || !id) {
    throw new Error('Invoice is malformed. invoice: ' + bill.invoice)
  }

  return [doctype, id]
}

const getBill = (transaction, actionProps) => {
  if (actionProps.bill) {
    return actionProps.bill
  }

  return get(transaction, 'bills.data[0]')
}

const transactionModalRowStyle = { color: palette.dodgerBlue }
export class BillComponent extends Component {
  state = {
    fileId: false
  }

  findFileId = async () => {
    const { transaction, actionProps } = this.props
    try {
      const bill = await getBill(transaction, actionProps)
      const [, fileId] = getBillInvoice(bill)
      this.setState({ fileId })
    } catch (e) {
      // eslint-disable-next-line no-console
      console.log(e)
    }
  }
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / TransactionActions.jsx View on Github external
* to show possible actions related to a transaction.
 *
 * The TransactionAction (the action the user is most susceptible
 * to need) can also be shown in desktop mode, directly in the
 * table.
 */

import React, { Component } from 'react'
import PropTypes from 'prop-types'
import palette from 'cozy-ui/transpiled/react/palette'
import { findMatchingActions } from 'ducks/transactions/actions'
import { TransactionActionsContext } from 'ducks/transactions/TransactionActionsContext'
import withContext from 'components/withContext'

// TODO delete or rename this variable (see https://gitlab.cozycloud.cc/labs/cozy-bank/merge_requests/237)
const PRIMARY_ACTION_COLOR = palette.dodgerBlue

const MenuAction = ({
  action,
  transaction,
  actionProps,
  compact = false,
  menuPosition,
  isModalItem
}) => {
  const { Component } = action
  const color = action.disabled
    ? palette.charcoalGrey
    : action.color || actionProps.color || PRIMARY_ACTION_COLOR

  return (
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / AppLinkAction.jsx View on Github external
const getAppName = (urls, transaction) => {
  const filteredUrls = omit(urls, ['COLLECT', 'HOME'])

  const label = transaction.label.toLowerCase()
  return findKey(
    filteredUrls,
    (url, appName) => url && label.indexOf(appName.toLowerCase()) !== -1
  )
}

const beautify = appName => {
  return appName.toLowerCase() === 'edf' ? 'EDF' : capitalize(appName)
}

const transactionModalRowStyle = { color: palette.dodgerBlue }
const Component = ({
  transaction,
  actionProps: { urls },
  compact,
  isModalItem
}) => {
  const { t } = useI18n()
  const appName = getAppName(urls, transaction)
  const label = t(`Transactions.actions.${name}`, {
    appName: beautify(appName)
  })
  const url = urls[appName]

  if (isModalItem) {
    return (
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / KonnectorAction / index.jsx View on Github external
import flag from 'cozy-flags'
import icon from 'assets/icons/actions/icon-link-out.svg'
import styles from 'ducks/transactions/TransactionActions.styl'
import TransactionModalRow from 'ducks/transactions/TransactionModalRow'
import palette from 'cozy-ui/transpiled/react/palette'
import { triggersConn } from 'doctypes'
import InformativeModal from 'ducks/transactions/actions/KonnectorAction/InformativeModal'
import ConfigurationModal from 'ducks/transactions/actions/KonnectorAction/ConfigurationModal'
import match from 'ducks/transactions/actions/KonnectorAction/match'
import { KonnectorChip } from 'components/KonnectorChip'
import { findMatchingBrandWithoutTrigger } from 'ducks/brandDictionary/selectors'
import { connect } from 'react-redux'

const name = 'konnector'

const transactionModalRowStyle = { color: palette.dodgerBlue }
class Component extends React.Component {
  state = {
    showInformativeModal: false,
    showIntentModal: false
  }

  showInformativeModal = () =>
    this.setState({
      showInformativeModal: true
    })

  hideInformativeModal = () =>
    this.setState({
      showInformativeModal: false
    })
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / ActionLink.jsx View on Github external
const ActionLink = ({
  href,
  text,
  target,
  onClick,
  icon,
  color = palette.dodgerBlue
}) => (
  <a color="" style="{{" href="{href}">
    {icon &amp;&amp; }
    {text}
  </a>
)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / HealthExpenseStatusAction.jsx View on Github external
getIcon: ({ transaction }) =&gt; {
    const color = isPending(transaction)
      ? palette.pomegranate
      : palette.dodgerBlue

    return 
  },
  match: transaction =&gt; {
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / UrlLinkAction.jsx View on Github external
import React from 'react'
import icon from 'assets/icons/actions/icon-link-out.svg'
import ButtonAction from 'cozy-ui/transpiled/react/ButtonAction'
import Chip from 'cozy-ui/transpiled/react/Chip'
import Icon from 'cozy-ui/transpiled/react/Icon'
import flag from 'cozy-flags'
import styles from 'ducks/transactions/TransactionActions.styl'
import TransactionModalRow from 'ducks/transactions/TransactionModalRow'
import palette from 'cozy-ui/transpiled/react/palette'

const name = 'url'

const transactionModalRowStyle = { color: palette.dodgerBlue }
const Component = ({ transaction, compact, isModalItem }) =&gt; {
  const action = transaction.action

  if (isModalItem) {
    return (
       open(action.url, action.target)}
        iconLeft="openwith"
        style={transactionModalRowStyle}
      &gt;
        {action.trad}
      
    )
  }

  return flag('reimbursements.tag') ? (
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / HealthLinkAction.jsx View on Github external
import React from 'react'
import { useI18n } from 'cozy-ui/transpiled/react'
import ButtonAction from 'cozy-ui/transpiled/react/ButtonAction'
import Chip from 'cozy-ui/transpiled/react/Chip'
import Icon from 'cozy-ui/transpiled/react/Icon'
import flag from 'cozy-flags'
import icon from 'assets/icons/actions/icon-link-out.svg'
import { isHealth } from 'ducks/categories/helpers'
import palette from 'cozy-ui/transpiled/react/palette'
import styles from 'ducks/transactions/TransactionActions.styl'
import TransactionModalRow from 'ducks/transactions/TransactionModalRow'

const name = 'refund'

const transactionModalRowStyle = { color: palette.dodgerBlue }
const Component = ({ actionProps: { urls }, compact, isModalItem }) =&gt; {
  const { t } = useI18n()
  const url = `${urls['HEALTH']}#/remboursements`
  const label = t(`Transactions.actions.${name}`)

  if (isModalItem) {
    return (
       open(url, '_blank')}
        iconLeft="openwith"
        style={transactionModalRowStyle}
      &gt;
        {label}
      
    )
  }
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / actions / HealthLinkAction.jsx View on Github external
) : (
     open(url)}
      label={label}
      rightIcon="openwith"
      compact={compact}
      className={styles.TransactionActionButton}
    /&gt;
  )
}

const action = {
  name,
  icon,
  color: palette.dodgerBlue,
  match: (transaction, { urls }) =&gt; {
    return isHealth(transaction) &amp;&amp; urls['HEALTH']
  },
  Component: Component
}

export default action