Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated STYLEGUIDE point #2244

Merged
merged 3 commits into from
Sep 23, 2024
Merged

Remove outdated STYLEGUIDE point #2244

merged 3 commits into from
Sep 23, 2024

Conversation

r100-stack
Copy link
Member

@r100-stack r100-stack commented Sep 16, 2024

Changes

Removed outdated point (#2244 (comment)) from the STYLEGUIDE:

iTwinUI/STYLEGUIDE.md

Lines 83 to 114 in cbd8aa1

### Destruct props and set default values
```jsx
// Good
export const Alert = (props: AlertProps) => {
const {
children,
className,
type = 'informational',
clickableText,
onClick,
onClose,
style,
isSticky = false,
} = props;
...
```
```jsx
// Bad
export const Alert = ({
children,
className,
type = 'informational',
clickableText,
onClick,
onClose,
style,
isSticky = false,
}: AlertProps) => {
...
```

Unrelated: Reused some prop types in SearchBox.tsx to prevent duplication.

Testing

Tests still passing.

Docs

N/A

@r100-stack r100-stack self-assigned this Sep 16, 2024
@r100-stack r100-stack marked this pull request as ready for review September 23, 2024 12:21
@r100-stack r100-stack requested a review from a team as a code owner September 23, 2024 12:21
@r100-stack r100-stack requested review from mayank99 and smmr-dn and removed request for a team September 23, 2024 12:21
@r100-stack r100-stack changed the title Separate the types and deconstruct props in function body Remove outdated point from STYLEGUIDE Sep 23, 2024
@r100-stack r100-stack changed the title Remove outdated point from STYLEGUIDE Remove outdated STYLEGUIDE point Sep 23, 2024
@r100-stack r100-stack merged commit e2f953a into main Sep 23, 2024
16 of 17 checks passed
@r100-stack r100-stack deleted the r/deconstruct-types branch September 23, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants