mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-30 23:04:59 +08:00
add .mdc file
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Enforces the use of functional components with hooks in React files.
|
||||
globs: src/**/*.jsx
|
||||
---
|
||||
- Always use functional components with hooks in React development.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Recommends utilizing styled-components' attrs method for frequently used props.
|
||||
globs: src/components/styled/**/*.js
|
||||
---
|
||||
- Utilize styled-components' attrs method for frequently used props.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Recommends using the css prop for conditional styling in Styled Components when appropriate.
|
||||
globs: src/components/styled/**/*.js
|
||||
---
|
||||
- Use the css prop for conditional styling when appropriate.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Ensures all styling is done using CSS-in-JS with Styled Components.
|
||||
globs: src/**/*.js
|
||||
---
|
||||
- Use CSS-in-JS for all styling needs.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Recommends following the styled-components documentation for best practices.
|
||||
globs: src/components/styled/**/*.js
|
||||
---
|
||||
- Follow the styled-components documentation for best practices.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Enforces proper naming conventions for Styled Components.
|
||||
globs: src/components/styled/**/*.js
|
||||
---
|
||||
- Use proper naming conventions for styled components (e.g., StyledButton).
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Specifies the use of a consistent theming system with Styled Components.
|
||||
globs: src/styles/theme.js
|
||||
---
|
||||
- Implement a consistent theming system.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Ensures proper TypeScript support for styled-components.
|
||||
globs: src/components/styled/**/*.tsx
|
||||
---
|
||||
- Implement proper TypeScript support for styled-components.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
description: Applies best practices for Styled Components within React components.
|
||||
globs: src/components/styled/**/*.js
|
||||
---
|
||||
- Use the styled-components/macro for better debugging.
|
||||
- Implement a global theme using ThemeProvider.
|
||||
- Create reusable styled components.
|
||||
- Use props for dynamic styling.
|
||||
- Utilize CSS helper functions like css`` when needed.
|
||||
Reference in New Issue
Block a user