Skip to content

Commit

Permalink
UPDATE: button props
Browse files Browse the repository at this point in the history
Co-authored-by: andregroseth <[email protected]>
Co-authored-by: shayany <[email protected]>
  • Loading branch information
3 people committed Oct 13, 2023
1 parent 0400301 commit 379fbb3
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions apps/frontend/src/components/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,24 @@ export type ButtonKind = (typeof KIND)[keyof typeof KIND] | 'outline' | 'underli
interface CustomButtonProps extends ButtonProps {

kind?:
| "primary"
| "primary-neutral"
| "secondary"
| "secondary-neutral"
| "tertiary"
| "tertiary-neutral"
| "danger"
| "underline-hover"
| "outline"
| 'primary'
| 'primary-neutral'
| 'secondary'
| 'secondary-neutral'
| 'tertiary'
| 'tertiary-neutral'
| 'danger'
| 'underline-hover'
| 'outline'
type?: 'submit' | 'reset' | 'button'
shape?: (typeof SHAPE)[keyof typeof SHAPE]
iconEnd?: IconDefinition
inline?: boolean
tooltip?: string
children?: ReactNode
onClick?: () => void
startEnhancer?: ReactNode
disabled?: boolean
$style?: StyleObject
marginRight?: boolean
marginLeft?: boolean
label?: string
hidePadding?: boolean
notBold?: boolean
}
Expand Down Expand Up @@ -138,15 +134,11 @@ const Button = (props: CustomButtonProps) => {
size={props.size}
onClick={() => props.onClick?.()}
disabled={props.disabled}
/* shape={props.shape}
overrides={{ BaseButton: overrides }}
startEnhancer={props.startEnhancer}
icon={props.icon}
iconPosition={props.iconPosition}
type={props.type}
aria-label={props.label}*/
>
{props.icon && <FontAwesomeIcon icon={props.icon} style={{ marginRight: props.children ? '.5rem' : undefined }} fixedWidth />}
{props.notBold ? props.children : <strong>{props.children}</strong>}
{props.iconEnd && <FontAwesomeIcon icon={props.iconEnd} style={{ marginLeft: props.children ? '.5rem' : undefined }} fixedWidth />}
</AkselButton>
</Tooltip>
<Block display="inline" marginRight={props.marginRight ? theme.sizing.scale600 : 0} />
Expand Down

0 comments on commit 379fbb3

Please sign in to comment.