-
-
Notifications
You must be signed in to change notification settings - Fork 12
feat(DSYS-484): migrate ButtonBase and Button to ADR-0003 and ADR-0004 #1074
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
Changes from all commits
ff43317
8157e48
a3300fc
8ae131b
97c2365
739a167
650a923
53ed92a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export { ButtonSize, ButtonVariant } from '../../types'; | ||
| export { ButtonSize, ButtonVariant } from '@metamask/design-system-shared'; | ||
| export { Button } from './Button'; | ||
| export type { ButtonProps } from './Button.types'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export { ButtonPrimarySize } from '../../../../types'; | ||
| export { ButtonPrimarySize } from '@metamask/design-system-shared'; | ||
| export { ButtonPrimary } from './ButtonPrimary'; | ||
| export type { ButtonPrimaryProps } from './ButtonPrimary.types'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export { ButtonSecondarySize } from '../../../../types'; | ||
| export { ButtonSecondarySize } from '@metamask/design-system-shared'; | ||
| export { ButtonSecondary } from './ButtonSecondary'; | ||
| export type { ButtonSecondaryProps } from './ButtonSecondary.types'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export { ButtonTertiarySize } from '../../../../types'; | ||
| export { ButtonTertiarySize } from '@metamask/design-system-shared'; | ||
| export { ButtonTertiary } from './ButtonTertiary'; | ||
| export type { ButtonTertiaryProps } from './ButtonTertiary.types'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| export { ButtonBaseSize } from '../../types'; | ||
| export { ButtonBaseSize } from '@metamask/design-system-shared'; | ||
| export { ButtonBase } from './ButtonBase'; | ||
| export { TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION } from './ButtonBase.constants'; | ||
| export type { ButtonBaseProps } from './ButtonBase.types'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export { ButtonHero } from './ButtonHero'; | ||
| export type { ButtonHeroProps } from './ButtonHero.types'; | ||
| export { ButtonHeroSize } from '../../types'; | ||
| export { ButtonHeroSize } from '@metamask/design-system-shared'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,14 @@ | ||
| import { FontWeight, TextVariant } from '@metamask/design-system-shared'; | ||
| import { | ||
| ButtonSize, | ||
| FontWeight, | ||
| TextVariant, | ||
| } from '@metamask/design-system-shared'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| import React, { forwardRef } from 'react'; | ||
|
|
||
| import { | ||
| BoxAlignItems, | ||
| BoxBackgroundColor, | ||
| ButtonIconSize, | ||
| ButtonSize, | ||
| BoxFlexDirection, | ||
| IconName, | ||
| } from '../../types'; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import type { ButtonVariant } from '../../types'; | ||
| import { ButtonVariant } from '@metamask/design-system-shared'; | ||
|
|
||
| import type { ButtonPrimaryProps } from './variants/ButtonPrimary'; | ||
| import type { ButtonSecondaryProps } from './variants/ButtonSecondary'; | ||
|
|
@@ -13,12 +13,12 @@ export type ButtonProps = { | |
| variant?: ButtonVariant; | ||
| } & ( | ||
| | (Omit<ButtonPrimaryProps, 'ref'> & { | ||
| variant?: ButtonVariant.Primary; | ||
| variant?: typeof ButtonVariant.Primary; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| }) | ||
| | (Omit<ButtonSecondaryProps, 'ref'> & { | ||
| variant?: ButtonVariant.Secondary; | ||
| variant?: typeof ButtonVariant.Secondary; | ||
| }) | ||
| | (Omit<ButtonTertiaryProps, 'ref'> & { | ||
| variant?: ButtonVariant.Tertiary; | ||
| variant?: typeof ButtonVariant.Tertiary; | ||
| }) | ||
| ); | ||
Uh oh!
There was an error while loading. Please reload this page.