Skip to content

Commit 157ae23

Browse files
Added Description icon
Signed-off-by: AasthathecoderX <bhat.aasthaa@gmail.com>
1 parent 6a8d333 commit 157ae23

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { render } from '@testing-library/react';
2+
import { DescriptionIcon } from '../icons';
3+
4+
describe('DescriptionIcon', () => {
5+
it('renders without errors', () => {
6+
render(<DescriptionIcon width={24} height={24} />);
7+
});
8+
9+
it('applies width and height', () => {
10+
const { getByTestId } = render(<DescriptionIcon width={24} height={24} />);
11+
const svgElement = getByTestId('description-icon-svg');
12+
expect(svgElement.getAttribute('width')).toBe('24');
13+
expect(svgElement.getAttribute('height')).toBe('24');
14+
});
15+
});
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { KEPPEL_GREEN_FILL, DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants';
2+
import { IconProps } from '../types';
3+
4+
const DescriptionIcon = ({
5+
width = DEFAULT_WIDTH,
6+
height = DEFAULT_HEIGHT,
7+
fill = KEPPEL_GREEN_FILL,
8+
...props
9+
}: IconProps): JSX.Element => (
10+
<svg
11+
width={width}
12+
height={height}
13+
viewBox="0 0 48 48"
14+
fill={fill}
15+
data-testid="description-icon-svg"
16+
xmlns="http://www.w3.org/2000/svg"
17+
{...props}
18+
>
19+
{/* SVG path data from Material UI Description icon will go here */}
20+
{/* Example paths based on Material UI icon structure */}
21+
<path d="M8 4h28v40H8z" />
22+
{/* Additional path elements as needed */}
23+
</svg>
24+
);
25+
26+
export default DescriptionIcon;

src/icons/Description/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as DescriptionIcon } from './DescriptionIcon';

src/icons/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export * from './Dashboard';
2626
export * from './DataObject';
2727
export * from './Delete';
2828
export * from './Deploy';
29+
export * from './Description';
2930
export * from './Designer';
3031
export * from './Detail';
3132
export * from './DropDownIcon';

0 commit comments

Comments
 (0)