Skip to content

Commit d527b4c

Browse files
committed
fix: update text to border-less and link to text
1 parent fa1fa7e commit d527b4c

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/Shared/Components/Button/button.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@
106106
}
107107
}
108108

109-
// Base styling is same for text and link button
110-
&__text,
111-
&__link {
109+
// Base styling is same for border-less and text button
110+
&__border-less,
111+
&__text {
112112
$background: transparent;
113113
$border-color: transparent;
114114

@@ -133,8 +133,8 @@
133133
}
134134
}
135135

136-
// Pseudo states for text button
137-
&__text {
136+
// Pseudo states for border-less button
137+
&__border-less {
138138
&--default {
139139
@include pseudo-states(var(--B100), var(--B200));
140140
}
@@ -156,8 +156,8 @@
156156
}
157157
}
158158

159-
// Overrides for link button
160-
&__link {
159+
// Overrides for text button
160+
&__text {
161161

162162
&--default,
163163
&--negative,

src/Shared/Components/Button/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import { TooltipProps } from '@Common/Tooltip/types'
22
import { ComponentSizeType } from '@Shared/constants'
33
import { ButtonHTMLAttributes, ReactElement } from 'react'
44

5+
// Using the same for BEM class elements
56
export enum ButtonVariantType {
67
primary = 'primary',
78
secondary = 'secondary',
9+
borderLess = 'border-less',
810
text = 'text',
9-
link = 'link',
1011
}
1112

1213
export enum ButtonStyleType {

src/Shared/Components/Button/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { BUTTON_SIZE_TO_CLASS_NAME_MAP } from './constants'
2-
import { ButtonProps, ButtonStyleType, ButtonVariantType } from './types'
2+
import { ButtonProps } from './types'
33

44
export const getButtonDerivedClass = ({
55
size,
66
variant,
77
style,
88
isLoading,
99
}: Pick<ButtonProps, 'variant' | 'size' | 'style' | 'isLoading'>) =>
10-
`button button__${ButtonVariantType[variant]}--${ButtonStyleType[style]} ${BUTTON_SIZE_TO_CLASS_NAME_MAP[size]} ${isLoading ? 'button--loading' : ''}`
10+
`button button__${variant}--${style} ${BUTTON_SIZE_TO_CLASS_NAME_MAP[size]} ${isLoading ? 'button--loading' : ''}`

0 commit comments

Comments
 (0)