File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
src/Shared/Components/Button Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 106
106
}
107
107
}
108
108
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 {
112
112
$background : transparent ;
113
113
$border-color : transparent ;
114
114
133
133
}
134
134
}
135
135
136
- // Pseudo states for text button
137
- & __text {
136
+ // Pseudo states for border-less button
137
+ & __border-less {
138
138
& --default {
139
139
@include pseudo-states (var (--B100 ), var (--B200 ));
140
140
}
156
156
}
157
157
}
158
158
159
- // Overrides for link button
160
- & __link {
159
+ // Overrides for text button
160
+ & __text {
161
161
162
162
& --default ,
163
163
& --negative ,
Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ import { TooltipProps } from '@Common/Tooltip/types'
2
2
import { ComponentSizeType } from '@Shared/constants'
3
3
import { ButtonHTMLAttributes , ReactElement } from 'react'
4
4
5
+ // Using the same for BEM class elements
5
6
export enum ButtonVariantType {
6
7
primary = 'primary' ,
7
8
secondary = 'secondary' ,
9
+ borderLess = 'border-less' ,
8
10
text = 'text' ,
9
- link = 'link' ,
10
11
}
11
12
12
13
export enum ButtonStyleType {
Original file line number Diff line number Diff line change 1
1
import { BUTTON_SIZE_TO_CLASS_NAME_MAP } from './constants'
2
- import { ButtonProps , ButtonStyleType , ButtonVariantType } from './types'
2
+ import { ButtonProps } from './types'
3
3
4
4
export const getButtonDerivedClass = ( {
5
5
size,
6
6
variant,
7
7
style,
8
8
isLoading,
9
9
} : 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' : '' } `
You can’t perform that action at this time.
0 commit comments