Skip to content

Commit e1d3bf5

Browse files
Copilotzdrawku
andcommitted
fix(skills): address code review feedback on event types and inline styles
Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
1 parent 57a865f commit e1d3bf5

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

  • skills

skills/igniteui-react-customize-theme/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ function AdminPanel() {
183183

184184
### Inline Styles on a Wrapper
185185

186-
For quick one-off overrides, you can apply CSS custom properties via inline styles:
186+
For truly dynamic one-off overrides, you can apply CSS custom properties via inline styles. **Prefer CSS classes or CSS modules** for better type safety and maintainability — use inline styles only when values need to change at runtime:
187187

188188
```tsx
189189
<div style={{ '--ig-primary-h': '260deg', '--ig-primary-s': '60%', '--ig-primary-l': '45%' } as React.CSSProperties}>
190190
<IgrButton>Custom Color Button</IgrButton>
191191
</div>
192192
```
193193

194-
> **Note:** TypeScript requires the `as React.CSSProperties` cast because CSS custom properties are not in the standard `CSSProperties` type.
194+
> **Note:** TypeScript requires the `as React.CSSProperties` cast because CSS custom properties are not in the standard `CSSProperties` type. This bypasses type safety — prefer CSS classes when possible.
195195
196196
---
197197

skills/igniteui-react-use-components/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ function MyForm() {
233233
};
234234

235235
const handleInput = (event: CustomEvent) => {
236-
console.log('Input value:', (event.target as HTMLInputElement).value);
236+
// event.target is the underlying web component element (e.g., igc-input)
237+
console.log('Input value:', (event.target as any).value);
237238
};
238239

239240
const handleChange = (event: CustomEvent) => {

0 commit comments

Comments
 (0)