@barbora-delivery/merchant-ui
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Install

npm install @barbora-delivery/merchant-ui

If that doesn't work, make sure to follow the steps for Retrieving private packages.

Quickstart

import { defineMessages } from 'react-intl'
import { Navigate, Outlet, ReactLocation, Router } from '@tanstack/react-location'
import { parseSearch, stringifySearch } from '@tanstack/react-location-jsurl'
import { ErrorTranslationContextProvider, LocaleContextProvider } from '@barbora-delivery/merchant-ui'
import '../node_modules/@barbora-delivery/merchant-ui/dist/tailwind.css'

export const formErrorsMessages = defineMessages({
  REQUIRED: {
    id: `form-errors.REQUIRED`,
    defaultMessage: 'Required',
  },
  FILL_ZONE_NAME: {
    id: `form-errors.FILL_ZONE_NAME`,
    defaultMessage: 'Fill Zone name first',
  },
} as const)

const location = new ReactLocation<LocationGenerics>({ parseSearch, stringifySearch })

const App: React.FC = () => {
  return (
    <LocaleContextProvider initialValue={'en'}>
      <ErrorTranslationContextProvider initialValue={formErrorsMessages}>
         <Router location={location} routes={[]}><Outlet /><Router>
      </ErrorTranslationContextProvider>
    </LocaleContextProvider>
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i @barbora-delivery/merchant-ui

Weekly Downloads

1

Version

2.0.0

License

UNLICENSED

Unpacked Size

343 kB

Total Files

457

Last publish

Collaborators

  • brb-express
  • ksenia_kychka
  • lukasm17
  • sauliusb
  • zibu-brbdev