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

refactor(site): unify components with export const arrow function, simplify structure in system and typography #1471

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sukvvon
Copy link
Contributor

@sukvvon sukvvon commented Aug 31, 2024

  • unify components with export const arrow function, add Props interface for each component,
  • simplify structure in system and typography

Copy link

changeset-bot bot commented Aug 31, 2024

⚠️ No Changeset found

Latest commit: e84e7a4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sukvvon sukvvon changed the title refactor(site): unify components with export const arrow function, add Props interface for each component, simplify structure in system, typography refactor(site): unify components with export const arrow function, simplify structure in system, typography Aug 31, 2024
@sukvvon sukvvon changed the title refactor(site): unify components with export const arrow function, simplify structure in system, typography refactor(site): unify components with export const arrow function, simplify structure in system and typography Aug 31, 2024
Copy link
Contributor

@askoufis askoufis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes. I have some minor comments.

@@ -0,0 +1,2 @@
export * from './reset.css';
Copy link
Contributor

@askoufis askoufis Sep 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd honestly prefer not to have barrel files. They just cause indirection and don't serve much of a purpose in a relatively small app like this docs site.

@@ -2,7 +2,11 @@ import { ReactNode } from 'react';
import { Box } from '../system';
import * as styles from './Blockquote.css';

export default (props: { children: ReactNode }) => {
export interface BlockquoteProps {
Copy link
Contributor

@askoufis askoufis Sep 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This export, any probably all the other exports you've added to prop types, are not necessary because those types aren't used outside the files they're defined in. They can be removed.

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.

2 participants