add LanOutlinedIcon to sistent icons#1553
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the LanOutlinedIcon component and its local export. Feedback suggests exporting the icon from the main library entry point (src/icons/index.ts) to ensure it is accessible to consumers. Additionally, it is recommended to incorporate a default fill color and a title prop for better accessibility and internationalization support.
| @@ -0,0 +1 @@ | |||
| export { default as LanOutlinedIcon } from './LanOutlined'; No newline at end of file | |||
| import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants'; | ||
| import { IconProps } from '../types'; | ||
|
|
||
| export const LanOutlinedIcon = ({ | ||
| width = DEFAULT_WIDTH, | ||
| height = DEFAULT_HEIGHT, | ||
| ...props | ||
| }: IconProps): JSX.Element => { | ||
| return ( | ||
| <svg | ||
| width={width} | ||
| height={height} | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| viewBox="0 0 24 24" | ||
| {...props} | ||
| > | ||
| <path d="M13,22h8v-7h-3v-4h-5V9h3V2H8v7h3v2H6v4H3v7h8v-7H8v-2h8v2h-3V22z M10,7V4h4v3H10z M9,17v3H5v-3H9z M19,17v3h-4v-3H19z" /> | ||
| </svg> | ||
| ); | ||
| }; |
There was a problem hiding this comment.
To maintain consistency with the project's design system and improve accessibility, the DEFAULT_FILL constant should be used as a default value for the fill prop. Additionally, the title prop should be rendered within a <title> tag inside the SVG to support accessibility and internationalization, as per the general guidelines for shared components.
import { DEFAULT_HEIGHT, DEFAULT_WIDTH, DEFAULT_FILL } from '../../constants/constants';
import { IconProps } from '../types';
export const LanOutlinedIcon = ({
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
fill = DEFAULT_FILL,
title,
...props
}: IconProps): JSX.Element => {
return (
<svg
width={width}
height={height}
fill={fill}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
{...props}
>
{title && <title>{title}</title>}
<path d="M13,22h8v-7h-3v-4h-5V9h3V2H8v7h3v2H6v4H3v7h8v-7H8v-2h8v2h-3V22z M10,7V4h4v3H10z M9,17v3H5v-3H9z M19,17v3h-4v-3H19z" />
</svg>
);
};
References
- Avoid hardcoding UI strings in shared components. Expose these strings as configurable props to support internationalization (i18n) and localization.
4717588 to
fa81f2c
Compare
Signed-off-by: Daniel Mungai <chegedan699@gmail.com>
fa81f2c to
4620a1c
Compare
Notes for Reviewers
This PR fixes #1514
Signed commits