How to use the cozy-ui/transpiled/react.withBreakpoints 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 / settings / AccountSettings.jsx View on Github external
import React from 'react'
import { translate, withBreakpoints } from 'cozy-ui/transpiled/react'
import { withDispatch } from 'utils'
import { flowRight as compose } from 'lodash'
import NewAccountSettings from './NewAccountSettings'

const AccountSettings = function(props) {
  return 
}

export default compose(
  withDispatch,
  translate(),
  withBreakpoints()
)(AccountSettings)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / reimbursements / ReimbursementsPage.jsx View on Github external
)
  }
}

function mapStateToProps(state) {
  return {
    filteringDoc: state.filters.filteringDoc
  }
}

const ReimbursementsPage = compose(
  withBreakpoints(),
  connect(mapStateToProps)
)(RawReimbursementsPage)
export default ReimbursementsPage
github cozy / cozy.github.io / en / cozy-banks / src / ducks / settings / NewAccountSettings.jsx View on Github external
)
}

const AccountSettingsForm = compose(
  withBreakpoints(),
  translate()
)(DumbAccountSettingsForm)

const FormControls = props => {
  const { t } = useI18n()
  const { onCancel, form, className, ...rest } = props

  return (
    <div>
      <button label="{t('General.cancel')}">
      </button></div>
github cozy / cozy.github.io / en / cozy-banks / src / components / SelectDates / SelectDates.jsx View on Github external
)
  }
}

SelectDates.defaultProps = {
  options: getDefaultOptions()
}

SelectDates.propTypes = {
  onChange: PropTypes.func.isRequired
}

export default compose(
  translate(),
  scrollAware,
  withBreakpoints(),
  themed
)(SelectDates)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / balance / HistoryChart.jsx View on Github external
pointFillColor="white"
          pointStrokeColor="rgba(255, 255, 255, 0.3)"
          getTooltipContent={this.getTooltipContent}
          data={data}
          width={width}
          height={height}
          {...this.props}
        /&gt;
      
    )
  }
}

const EnhancedHistoryChart = compose(
  withRouter,
  withBreakpoints(),
  translate()
)(HistoryChart)

export const ConnectedHistoryChart = compose(
  withRouter,
  connect((state, ownProps) =&gt; ({
    data: getChartData(state, ownProps)
  })),
  withBreakpoints(),
  translate()
)(HistoryChart)

export default EnhancedHistoryChart
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / TransactionsPage.jsx View on Github external
const mapStateToProps = (state, ownProps) => {
  const filteredTransactions = onSubcategory(ownProps)
    ? getFilteredTransactions(state, ownProps)
    : getTransactionsFilteredByAccount(state)

  return {
    filteringDoc: getFilteringDoc(state),
    filteredTransactions: filteredTransactions
  }
}

export const DumbTransactionsPage = TransactionsPage
export const UnpluggedTransactionsPage = compose(
  withRouter,
  translate(),
  withBreakpoints()
)(TransactionsPage)

UnpluggedTransactionsPage.propTypes = {
  filteredTransactions: PropTypes.array.isRequired
}

const ConnectedTransactionsPage = compose(
  withRouter,
  queryConnect({
    accounts: accountsConn,
    groups: groupsConn,
    triggers: triggersConn,
    transactions: transactionsConn
  }),
  connect(mapStateToProps)
)(UnpluggedTransactionsPage)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / settings / Settings.jsx View on Github external
{children}
      {__TARGET__ === 'mobile' &amp;&amp; (
        
          
        
      )}
    
  )
}

export default compose(
  withRouter,
  flag.connect,
  withBreakpoints()
)(Settings)
github cozy / cozy.github.io / en / cozy-banks / src / ducks / balance / History.jsx View on Github external
) : (
          
        )}
      
    )
  }
}

History.propTypes = {
  accounts: PropTypes.array.isRequired,
  className: PropTypes.string,
  transactions: PropTypes.object.isRequired
}

export default compose(
  withBreakpoints(),
  withSize()
)(History)
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; {
    return (
      isHealthExpense(transaction) &amp;&amp;
      getVendors(transaction) &amp;&amp;
      !flag('reimbursements.tag')
    )
  },
  Component: compose(
    withBreakpoints(),
    translate()
  )(Component)
}

export default action
github cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / TransactionHeader.jsx View on Github external
)}
        
          {transactions.length &gt; 0 &amp;&amp; (
            
          )}
        
      
    )
  }
}

export default compose(
  withRouter,
  withBreakpoints(),
  withSize(),
  translate()
)(TransactionHeader)