Skip to content

Commit

Permalink
feat: added disput mode button desktop #190
Browse files Browse the repository at this point in the history
  • Loading branch information
habdevs committed Sep 7, 2023
1 parent 317a91b commit e52699a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions components/LeftPanel/LeftPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const LeftPanel: React.FC<LeftPanelPropsI> = ({
image={hourglassIcon.src}
imageSize='24'
imagePosition={"right"}
disabled={!isDisputAvailable}
onClick={onRunDisput}
/>
<CustomButton
size='sm'
Expand Down
12 changes: 8 additions & 4 deletions components/shared/ui/CustomButton/CustomButton.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
border: 1px solid var(--light-grey, #e8e8e8);
margin-bottom: 40px;

&.disabled {
cursor: not-allowed;
}

}

.button {
Expand All @@ -25,6 +23,9 @@
font-weight: 500;
line-height: 1.2;
text-decoration: none;
&.disabled {
cursor: not-allowed;
}
}

.text {
Expand All @@ -43,7 +44,10 @@
@media (min-width: 1024px) {
font-size: 2rem;
}
@media (min-width: 1368px) {
@media (min-width: 1200px) {
font-size: 2.2rem;
}
@media (min-width: 1920px) {
font-size: 2.7rem;
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/shared/ui/CustomButton/CustomButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const CustomButton: FC<ICustomButtonProps> = ({

if (link) {
return (
<Link href={link} target='_blank'>
<a target='_blank' className={buttonClasses}>
<Link href={link} target='_blank' >
<a target='_blank' className={buttonClasses} {...rest}>
{imagePosition === 'left' && (
<img src={image} alt='Button Image' className={styles.image} style={imageStyles} />
)}
Expand Down
3 changes: 2 additions & 1 deletion components/shared/ui/CustomButton/CustomButtonProps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export interface ICustomButtonProps {
onClick?: () => void;
disabled?: boolean;
onClick: () => Promise<void>;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
color?: 'transparent' | 'dark' | 'gradient';
textColor?: string;
Expand Down

0 comments on commit e52699a

Please sign in to comment.