Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index.ts to components and refactor imports #7

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
RoachxD marked this conversation as resolved.
Show resolved Hide resolved

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
Loading