-
Notifications
You must be signed in to change notification settings - Fork 1
IBX-10191: Update various variables and names to match figma changes #7
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
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,36 +1,36 @@ | ||
| @use 'variables'; | ||
| @use 'variables' as *; | ||
|
|
||
| %heading { | ||
| font-family: variables.$font-family-headings; | ||
| font-family: $font-family-alt; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| @mixin h1 { | ||
| @extend %heading; | ||
| font-size: variables.$h1-font-size; | ||
| font-size: $text-font-size-3xl; | ||
| } | ||
|
|
||
| @mixin h2 { | ||
| @extend %heading; | ||
| font-size: variables.$h2-font-size; | ||
| font-size: $text-font-size-2xl; | ||
| } | ||
|
|
||
| @mixin h3 { | ||
| @extend %heading; | ||
| font-size: variables.$h3-font-size; | ||
| font-size: $text-font-size-xl; | ||
| } | ||
|
|
||
| @mixin h4 { | ||
| @extend %heading; | ||
| font-size: variables.$h4-font-size; | ||
| font-size: $text-font-size-l; | ||
| } | ||
|
|
||
| @mixin h5 { | ||
| @extend %heading; | ||
| font-size: variables.$h5-font-size; | ||
| font-size: $text-font-size-m; | ||
| } | ||
|
|
||
| @mixin h6 { | ||
| @extend %heading; | ||
| font-size: variables.$h6-font-size; | ||
| font-size: $text-font-size-s; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,16 +11,16 @@ const Button = ({ | |
| disabled = false, | ||
| extraAria = {}, | ||
| extraClasses = '', | ||
| size = 'large', | ||
| size = 'medium', | ||
| title = '', | ||
| type = 'primary', | ||
| }: ButtonProps) => { | ||
| const classes = createCssClassNames({ | ||
| 'ids-btn': true, | ||
| [`ids-btn--${type}`]: !!type, | ||
| [`ids-btn--${size}`]: !!size, | ||
| [`ids-btn--${type}`]: true, | ||
| [`ids-btn--${size}`]: true, | ||
| 'ids-btn--disabled': disabled, | ||
| [extraClasses]: true, | ||
| [extraClasses]: !!extraClasses, | ||
|
Contributor
Author
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.
|
||
| }); | ||
| const btnAriaLabel = ariaLabel ?? (typeof children === 'string' ? children : undefined); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,11 +6,11 @@ import { createCssClassNames } from '@ids-internal/shared/css.class.names'; | |
|
|
||
| import { IconProps } from './Icon.types'; | ||
|
|
||
| const Icon = ({ cssClass = '', name, customPath, size = undefined }: IconProps) => { | ||
| const Icon = ({ cssClass = '', name, customPath, size = 'small' }: IconProps) => { | ||
|
Contributor
Author
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. adjust to other components that doesn't allow for undefined values, "default" (without size modifier) is same as "small" in css |
||
| const { getIconPath }: { getIconPath: GetIconPathType } = useContext<AssetsType>(AssetsContext); | ||
| const classes = createCssClassNames({ | ||
| 'ids-icon': true, | ||
| [`ids-icon--${size ?? ''}`]: !!size, | ||
| [`ids-icon--${size}`]: true, | ||
| [cssClass]: !!cssClass, | ||
| }); | ||
| const linkHref = customPath ?? getIconPath(name); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we use TypeScript both type and size accepts only specific string values, so both these conditions always be true