File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import React , { HTMLAttributes , ReactElement , ReactNode } from 'react' ;
12import classnames from 'classnames' ;
23import PropTypes from 'prop-types' ;
3- import { HTMLAttributes , ReactElement , ReactNode } from 'react' ;
44
5- type Variant =
6- | 'primary'
7- | 'secondary'
8- | 'tertiary'
9- | 'destructive'
10- | 'appPrimary'
11- | 'appSecondary' ;
5+ type Variant = 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'appPrimary' | 'appSecondary' ;
126type Width = 'small' | 'medium' | 'large' | 'full' ;
137type Size = 'small' | 'medium' | 'large' ;
148
@@ -73,7 +67,7 @@ function getColor(variant: Variant): string {
7367 case 'secondary' :
7468 case 'appPrimary' :
7569 case 'appSecondary' :
76- return 'gray' ;
70+ return 'gray'
7771 case 'tertiary' :
7872 return 'transparent' ;
7973 case 'destructive' :
@@ -107,6 +101,7 @@ export default function Button({
107101 href,
108102 children
109103} : Props ) : ReactElement {
104+
110105 const isSmall : boolean = size === 'small' ;
111106 const isMedium : boolean = size === 'medium' ;
112107 const isLarge : boolean = size === 'large' ;
@@ -156,7 +151,9 @@ export default function Button({
156151 disabled
157152 } ;
158153
159- return < button type = "button" { ...buttonProps } /> ;
154+ return (
155+ < button type = "button" { ...buttonProps } />
156+ ) ;
160157}
161158
162159Button . propTypes = {
You can’t perform that action at this time.
0 commit comments