Skip to content

Commit

Permalink
Merge pull request #7 from RoachxD/feat_components_index
Browse files Browse the repository at this point in the history
Add `index.ts` to `components` and refactor imports
  • Loading branch information
SanichKotikov authored Aug 17, 2023
2 parents 200ae49 + 5879d7e commit 2935c2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './DateTime';
export * from './I18nProvider';
export * from './Numeric';
export * from './Text';
11 changes: 3 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ import { createI18n as create } from 'i18n-mini';
import type { I18nOptions } from 'i18n-mini';
import type { I18n } from './types';

export type { I18n, I18nOptions };

export { defineMessages } from 'i18n-mini';
export type { I18nPresets } from 'i18n-mini';

export { I18nProvider } from './components/I18nProvider';
export { Text } from './components/Text';
export { Numeric } from './components/Numeric';
export { DateTime } from './components/DateTime';
export * from './components';
export { useI18n } from './context';

export type { TextProps } from './components/Text';
export type { NumericProps } from './components/Numeric';
export type { DateTimeProps } from './components/DateTime';
export type { I18n } from './types';

function formatTag(tag: string, child: string | string[] | undefined) {
const el = template(`<${tag}>`);
Expand Down

0 comments on commit 2935c2a

Please sign in to comment.