UNPKG

@tuwaio/nova-transactions

Version:

A React component library that provides the UI for @tuwaio/pulsar-core. Includes components, providers, and i18n support for transaction tracking.

38 lines (35 loc) 1.44 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode } from 'react'; import { N as NovaTransactionsLabels } from '../TransactionsInfoModal-6RO18o9e.cjs'; export { G as NovaTransactionsProvider, F as NovaTransactionsProviderProps } from '../TransactionsInfoModal-6RO18o9e.cjs'; import '@tuwaio/nova-core'; import '@tuwaio/pulsar-core'; import '@tuwaio/orbit-core'; import 'react-toastify'; import 'framer-motion'; /** * A React component that provides a custom set of labels to all child components. * Wrap your application or component tree with this provider to apply custom translations. * * @param {object} props - The component props. * @param {NovaTransactionsLabels} props.labels - An object containing the custom labels. * @param {ReactNode} props.children - The child components to render. */ declare const NovaTransactionsLabelsProvider: ({ labels, children, }: { labels: NovaTransactionsLabels; children: ReactNode; }) => react_jsx_runtime.JSX.Element; /** * A custom hook to easily access the i18n labels from any component * within the `NovaTransactionsLabelsProvider` tree. * * @returns {NovaTransactionsLabels} The complete object of UI labels. * * @example * const MyComponent = () => { * const labels = useLabels(); * return <h1>{labels.walletModal.title}</h1>; * } */ declare const useLabels: () => NovaTransactionsLabels; export { NovaTransactionsLabelsProvider, useLabels };