Skip to content

Commit

Permalink
Merge pull request #103 from Giveth/add_id_to_button
Browse files Browse the repository at this point in the history
Fix: added id property to button
  • Loading branch information
MohammadPCh authored Jun 12, 2024
2 parents 7d2408a + 1bb628c commit 65ad5e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const ButtonContainer = styled.button<IButtonContainerProps>`
border: 0 solid;
border-radius: 48px;
padding: ${props => (props.size === 'large' ? '24px' : '16px')} 24px;
transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
transition:
background-color 0.3s ease,
color 0.3s ease,
opacity 0.3s ease;
display: flex;
justify-content: center;
align-items: center;
Expand Down Expand Up @@ -158,9 +161,11 @@ export const Button: FC<IButtonProps> = ({
leftIcon,
className,
type = 'button',
id,
}) => {
return (
<ButtonContainer
id={id}
$buttonType={buttonType}
size={size}
disabled={disabled}
Expand Down
1 change: 1 addition & 0 deletions src/components/buttons/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export interface IButtonProps extends ComponentPropsWithoutRef<'button'> {
buttonType?: ButtonStyleType;
disabled?: boolean;
size?: ButtonSize;
id?: string;
}

0 comments on commit 65ad5e7

Please sign in to comment.