Skip to content

Commit

Permalink
feat: vue3 package add button export
Browse files Browse the repository at this point in the history
  • Loading branch information
LonelySnowman committed Oct 16, 2024
1 parent af6f0fb commit 025d523
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions packages/vue3/components.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// export type { ButtonProps } from './button';
// export { default as Button } from './button';
export type { buttonProps } from './button';
export { default as Button } from './button';

export type { ConfigProviderProps } from './config-provider';
export type { configProviderProps } from './config-provider';
export { default as ConfigProvider } from './config-provider';

export type { paginationProps } from './pagination';
Expand Down
12 changes: 4 additions & 8 deletions packages/vue3/config-provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ import { defineComponent } from 'vue';
import type { PropType } from 'vue';
import { withInstall } from '../_utils';

export interface ConfigProviderProps {
locale?: Locale;
}
export const configProviderProps = () => ({
locale: Object as PropType<Locale>,
});

const ConfigProvider = defineComponent({
name: 'SConfigProvider',
props: {
locale: {
type: Object as PropType<Locale>,
},
},
props: configProviderProps(),
setup(props, { slots }) {
const { locale } = props;
const children = slots.default?.();
Expand Down
2 changes: 2 additions & 0 deletions packages/vue3/typings/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
declare module 'vue' {
export interface GlobalComponents {
SButton: (typeof import('@snow-design/vue3'))['Button'];

SConfigProvider: (typeof import('@snow-design/vue3'))['ConfigProvider'];

SPagination: (typeof import('@snow-design/vue3'))['Pagination'];
}
}
Expand Down

0 comments on commit 025d523

Please sign in to comment.