Update Cursor rules

This commit is contained in:
2025-11-03 12:11:22 +03:00
Unverified
parent 6d970dbd61
commit 1c38bc39ec
2 changed files with 11 additions and 5 deletions
+5 -4
View File
@@ -3,10 +3,11 @@ alwaysApply: true
---
When you work with UI:
1. Use MDUI components as HTML elements with the name "mdui-***". In JSX/TSX use the same elements and props as in HTML.
1. Use MDUI components through the wrapper: `@/utils/material`. If the component you want to use is missing in that wrapper,
add it. Do NOT remove anything.
3. The supporting text slot for MDUI lists is "description".
4. When working with lists/sets in states, use the "useImmer" hook.
5. Do NOT use inline styles in React components if they are static, instead write them in CSS.
The CSS is placed in `frontend/src/resources/css/`. Find the appropriate file to put the styles in.
5. Do NOT use inline styles in React components if they are static, instead write them in CSS.
Find the appropriate file to put the styles in, or create a new one.
6. In SCSS, for Material Design colors use `$color-dark-<color-name>` variables. For all colors, refer
to `frontend/src/resources/css/common/_colors.scss`.
to `frontend/src/css/_material.scss`.