Skip to content

Commit e876774

Browse files
authored
Merge branch 'master' into aryanshah/add_hooks
2 parents e25e376 + e0eecd5 commit e876774

File tree

4 files changed

+101
-4
lines changed

4 files changed

+101
-4
lines changed

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,43 @@ Run the following command before commiting the changes:
129129
make lint
130130
```
131131

132+
# Project Directory Structure
133+
134+
## Overview of `/src` Directory
135+
136+
### actors
137+
138+
### assets
139+
140+
- Assets are the files that are used in the project. These files can be images, videos, logos or fonts etc. The assets directory is used to store all the assets that are used in the project.
141+
142+
### base
143+
144+
- Base directory contains all the basic components that are used in the project. These components are the building blocks of the project. The base directory contains the following subdirectories like `Buttons`, `Forms`, `Typography` etc.
145+
146+
### constants
147+
148+
- Constants directory contains all the constants that are used in the project. These constants can be colors, fonts, breakpoints etc.
149+
150+
### custom
151+
152+
- Custom directory contains all the custom components using the theme colors.
153+
154+
### icons
155+
156+
- Icons directory contains all the icons that are used in the project or can be used in any of other projects.
157+
158+
### theme
159+
160+
- Theme directory contains all the theme related files. The theme directory contains the following subdirectories like:
161+
- `Colors`- contains all the colors that are used in the project or theme components.
162+
- `components` - contains all the theme components like `Button`,
163+
- `Typography` with brand colors.
164+
- [`typography.ts`](https://github.com/layer5io/sistent/blob/master/src/theme/typography.ts) - contains all the typography related files like `font-size`, `font-family` etc.
165+
- [`palette.ts`](https://github.com/layer5io/sistent/blob/master/src/theme/palette.ts) - contains all the tokens that are used in the project and used in components.
166+
167+
Through the theme directory, we export the SistentThemeProvider which is used to provide the theme to the project.
168+
132169
# <a name="maintaining"> Reviews</a>
133170

134171
All contributors are invited to review pull requests. See this short video on [how to review a pull request](https://www.youtube.com/watch?v=isLfo7jfE6g&feature=youtu.be).

src/custom/CustomCatalog/style.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { styled, Typography } from '@mui/material';
2-
import { accentGrey, DARK_PRIMARY_COLOR, GRAY97, slateGray, WHITESMOKE } from '../../theme';
2+
import { accentGrey, DARK_PRIMARY_COLOR, GRAY97, WHITESMOKE } from '../../theme';
33
import { charcoal, DARK_TEAL, SNOW_WHITE } from '../../theme/colors/colors';
44

55
type DesignCardProps = {
@@ -52,9 +52,11 @@ export const StyledInnerClassWrapper = styled('div')<StyledInnerClassWrapperProp
5252
theme
5353
}) => {
5454
const mapToColor: Record<string, string> = {
55-
community: slateGray.main,
56-
official: theme.palette.background.cta?.default || '#EBC017',
57-
verified: theme.palette.background.brand?.default || '#00B39F'
55+
community: theme.palette.catalogStatus?.community,
56+
official:
57+
theme.palette.catalogStatus?.official,
58+
verified:
59+
theme.palette.catalogStatus?.verified
5860
};
5961
return {
6062
font: 'bold 10px sans-serif',

src/theme/palette.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,17 @@ declare module '@mui/material/styles' {
169169
alt: string;
170170
};
171171
};
172+
status: {
173+
success: string;
174+
warning: string;
175+
error: string;
176+
info: string;
177+
};
178+
catalogStatus: {
179+
community: string;
180+
official: string;
181+
verified: string;
182+
};
172183
}
173184

174185
// surface tokens need to have enough contrast
@@ -261,6 +272,18 @@ declare module '@mui/material/styles' {
261272
alt: string;
262273
};
263274
};
275+
276+
status: {
277+
success: string;
278+
warning: string;
279+
error: string;
280+
info: string;
281+
};
282+
catalogStatus: {
283+
community: string;
284+
official: string;
285+
verified: string;
286+
};
264287
}
265288
}
266289

@@ -416,6 +439,17 @@ export const lightModePalette: PaletteOptions = {
416439
default: Colors.charcoal[40],
417440
alt: Colors.charcoal[40]
418441
}
442+
},
443+
status: {
444+
success: Colors.notificationColors.success.main,
445+
warning: Colors.notificationColors.warning.main,
446+
error: Colors.notificationColors.error.main,
447+
info: Colors.notificationColors.info.main
448+
},
449+
catalogStatus: {
450+
community: Colors.slateGray.main,
451+
official: Colors.saffron[40],
452+
verified: Colors.keppel[40]
419453
}
420454
};
421455

@@ -567,5 +601,16 @@ export const darkModePalette: PaletteOptions = {
567601
default: Colors.accentGrey[100],
568602
alt: Colors.keppel[40]
569603
}
604+
},
605+
status: {
606+
success: Colors.notificationColors.success.main,
607+
warning: Colors.notificationColors.warning.main,
608+
error: Colors.notificationColors.error.main,
609+
info: Colors.notificationColors.info.main
610+
},
611+
catalogStatus: {
612+
community: Colors.slateGray.main,
613+
official: Colors.saffron[40],
614+
verified: Colors.keppel[40]
570615
}
571616
};

src/theme/theme.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,19 @@ export const createCustomTheme = (mode: PaletteMode, primitives?: PrimitivePalet
297297
default: alpha(p.foreground, 0.9),
298298
alt: alpha(p.foreground, 0.8)
299299
}
300+
},
301+
status: {
302+
//->org-independent status colors
303+
success: Colors.notificationColors.success.main,
304+
warning: Colors.notificationColors.warning.main,
305+
error: Colors.notificationColors.error.main,
306+
info: Colors.notificationColors.info.main
307+
},
308+
//->catalog status colors (org-independent)
309+
catalogStatus: {
310+
community: Colors.slateGray.main,
311+
official: Colors.saffron[40],
312+
verified: Colors.keppel[40]
300313
}
301314
}
302315
: {};

0 commit comments

Comments
 (0)