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

Docs: Icon documentation update (React) #1818

Merged
merged 3 commits into from
Oct 23, 2023
Merged

Conversation

pixelflips
Copy link
Member

@pixelflips pixelflips commented Oct 16, 2023

Description

Updates icon documentation to provide clarity and reduce overall code complexity of examples.

Screenshots

Before After
Screenshot 2023-10-23 at 9 52 06 AM Screenshot 2023-10-23 at 9 50 48 AM

Testing in sage-lib

  • Navigate to storybook icon
  • Verify documentation updates.

Testing in kajabi-products

  1. (LOW) Update to icon react component documentation. No effect on KP expected

Related

N/A

@pixelflips pixelflips added the documentation Improvements or additions to documentation label Oct 16, 2023
@pixelflips pixelflips self-assigned this Oct 16, 2023
@pixelflips pixelflips marked this pull request as ready for review October 16, 2023 21:13
@ju-Skinner
Copy link
Collaborator

I would like to see the descriptions of each of the properties in the Props Table. You can do this by adding comments to the PropTypes in Icon.jsx

e.g

Icon.propTypes = {
  /**
   * This is a description
   */
  adjacentType: PropTypes.oneOf(Object.values(Icon.ADJACENT_TYPES)),
  backgroundHeight: PropTypes.string,
  backgroundWidth: PropTypes.string,
  cardColor: PropTypes.oneOf(Object.values(Icon.CARD_COLORS)),
  circular: PropTypes.bool,
  className: PropTypes.string,
  color: PropTypes.oneOf(Object.values(Icon.COLORS)),
  icon: PropTypes.oneOf(Object.values(Icon.ICONS)).isRequired,
  label: PropTypes.string,
  size: PropTypes.oneOf(Object.values(Icon.SIZES)),

Will yield

image

@pixelflips
Copy link
Member Author

I would like to see the descriptions of each of the properties in the Props Table.

@ju-Skinner copied the descriptions over from the Rails side so they match up. Let me know if that works.

@pixelflips pixelflips merged commit 2af60a6 into develop Oct 23, 2023
4 checks passed
@pixelflips pixelflips deleted the docs/pl-docs-icon-react branch October 23, 2023 17:39
@pixelflips pixelflips mentioned this pull request Oct 23, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants