Skip to content

Commit b9e58d1

Browse files
authored
Merge pull request #60 from Giveth/some_fixes_by_ramin
Some fixes by ramin
2 parents 273cb15 + c394f5c commit b9e58d1

File tree

5 files changed

+30
-3
lines changed

5 files changed

+30
-3
lines changed

src/common/deviceSize.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export const deviceSize = {
2+
mobileS: 320,
3+
mobileM: 375,
4+
mobileL: 425,
5+
tablet: 768,
6+
laptopS: 1024,
7+
laptopL: 1280,
8+
desktop: 1440,
9+
};
10+
11+
export const mediaQueries = {
12+
mobileS: `@media (min-width: ${deviceSize.mobileS}px)`,
13+
mobileM: `@media (min-width: ${deviceSize.mobileM}px)`,
14+
mobileL: `@media (min-width: ${deviceSize.mobileL}px)`,
15+
tablet: `@media (min-width: ${deviceSize.tablet}px)`,
16+
laptopS: `@media (min-width: ${deviceSize.laptopS}px)`,
17+
laptopL: `@media (min-width: ${deviceSize.laptopL}px)`,
18+
desktop: `@media (min-width: ${deviceSize.desktop}px)`,
19+
};

src/components/buttons/Button.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const ButtonContainer = styled.button<IButtonContainerProps>`
2121
if (props.buttonType === 'texty') {
2222
return `color: ${brandColors.giv[500]};background: unset};padding: 8px 24px;opacity: 0.5;`;
2323
}
24+
if (props.buttonType === 'primary') {
25+
return `background: ${brandColors.pinky[300]};color: ${brandColors.pinky[200]};`;
26+
}
2427
return `color: ${brandColors.giv[400]};background: ${brandColors.giv[500]};opacity: 0.5;`;
2528
}
2629
switch (props.buttonType) {

src/components/buttons/OulineButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const ButtonContainer = styled.button<IButtonContainerProps>`
2121
switch (props.buttonType) {
2222
case 'primary':
2323
return props.disabled
24-
? `color: ${brandColors.giv[500]};border-color: ${brandColors.giv[500]};opacity: 0.4;`
24+
? `color: ${brandColors.pinky[300]};border-color: ${brandColors.pinky[300]};`
2525
: `color: ${brandColors.pinky[400]};border-color: ${brandColors.pinky[400]};`;
2626
case 'secondary':
2727
return props.disabled

src/components/buttons/common.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ export const LoadingContainer = styled.div<{ loading: number }>`
1212
export const Loader = styled.div<IButtonContainerProps>`
1313
border: 3px solid
1414
${props => {
15-
if (props.disabled) return brandColors.giv[600];
16-
15+
if (props.disabled) {
16+
switch (props.buttonType) {
17+
case 'primary':
18+
return brandColors.pinky[400];
19+
}
20+
}
1721
switch (props.buttonType) {
1822
case 'primary':
1923
return brandColors.pinky[600];

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './components';
22
export * from './common/colors';
3+
export * from './common/deviceSize';

0 commit comments

Comments
 (0)