Skip to content

Commit

Permalink
refactor(sdk,main-button): rework the way we export the component
Browse files Browse the repository at this point in the history
  • Loading branch information
heyqbnk committed Oct 1, 2024
1 parent 5964671 commit 8fa1ffb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
20 changes: 1 addition & 19 deletions packages/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,7 @@ export {
open as openInvoice,
} from '@/scopes/components/invoice/invoice.js';

export * as mainButton from '@/scopes/components/main-button/instance.js';
export {
backgroundColor as mainButtonBackgroundColor,
hasShineEffect as mainButtonHasShineEffect,
isMounted as isMainButtonMounted,
isVisible as isMainButtonVisible,
isEnabled as isMainButtonEnabled,
isLoaderVisible as isMainButtonLoaderVisible,
mount as mountMainButton,
onClick as onMainButtonClick,
offClick as offMainButtonClick,
setParams as setMainButtonParams,
state as mainButtonState,
textColor as mainButtonTextColor,
text as mainButtonText,
unmount as unmountMainButton,
} from '@/scopes/components/main-button/instance.js';
export * as MainButton from '@/scopes/components/main-button/static.js';

export * from '@/scopes/components/main-button/exports.js';
export * from '@/scopes/components/mini-app/exports.js';

export * as popup from '@/scopes/components/popup/instance.js';
Expand Down
18 changes: 18 additions & 0 deletions packages/sdk/src/scopes/components/main-button/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export {
backgroundColor as mainButtonBackgroundColor,
hasShineEffect as mainButtonHasShineEffect,
isMounted as isMainButtonMounted,
isEnabled as isMainButtonEnabled,
isLoaderVisible as isMainButtonLoaderVisible,
isVisible as isMainButtonVisible,
mount as mountMainButton,
offClick as offMainButtonClick,
onClick as onMainButtonClick,
setParams as setMainButtonParams,
state as mainButtonState,
textColor as mainButtonTextColor,
text as mainButtonText,
unmount as unmountMainButton,
} from './exports.variable.js';
export type { State as MainButtonState } from './types.js';
export * as miniApp from './exports.variable.js';
12 changes: 12 additions & 0 deletions packages/sdk/src/scopes/components/main-button/exports.variable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export * from './methods.js';
export {
backgroundColor,
hasShineEffect,
isMounted,
isEnabled,
isLoaderVisible,
isVisible,
state,
textColor,
text,
} from './signals.js';

0 comments on commit 8fa1ffb

Please sign in to comment.