Skip to content

Commit

Permalink
docs(icon): add descriptions for props table
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflips committed Oct 17, 2023
1 parent a34b46f commit ad585e6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions packages/sage-react/lib/Icon/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,44 @@ Icon.defaultProps = {
};

Icon.propTypes = {
/**

Check failure on line 98 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Improves alignment for icons that are placed beside type.
**/
adjacentType: PropTypes.oneOf(Object.values(Icon.ADJACENT_TYPES)),
/**

Check failure on line 102 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Allows a custom height for the icon background.
**/
backgroundHeight: PropTypes.string,
/**

Check failure on line 106 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Allows a custom width for the icon background.
**/
backgroundWidth: PropTypes.string,
/**

Check failure on line 110 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Rather than just changing the icon color with the color property, this option adds a padded background behind the icon in one of the brand status color options.

Check failure on line 111 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

This line has a length of 165. Maximum allowed is 100
**/
cardColor: PropTypes.oneOf(Object.values(Icon.CARD_COLORS)),
/**

Check failure on line 114 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Optionally, when an icon has a background color, present the shape inside a circle (as opposed to default square with rounded corners.

Check failure on line 115 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

This line has a length of 139. Maximum allowed is 100
**/
circular: PropTypes.bool,
/**

Check failure on line 118 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Allows a custom class name to be added to the icon.
**/
className: PropTypes.string,
/**

Check failure on line 122 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Which color to use to render the icon.
**/
color: PropTypes.oneOf(Object.values(Icon.COLORS)),
/**

Check failure on line 126 in packages/sage-react/lib/Icon/Icon.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build

Expected space or tab before '*/' in comment
* Which icon to display.
**/
icon: PropTypes.oneOf(Object.values(Icon.ICONS)).isRequired,
/**
* An optional accessible label to use for the icon.
**/
label: PropTypes.string,
/**
* Adjusts the size of the icon.
**/
size: PropTypes.oneOf(Object.values(Icon.SIZES)),
};

0 comments on commit ad585e6

Please sign in to comment.