Skip to content

Commit

Permalink
fix(svg): fix iconprops
Browse files Browse the repository at this point in the history
fix #244
  • Loading branch information
nebula-aac committed Nov 12, 2023
1 parent 822671a commit 697e2f7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/svg/src/icons/Close/CloseIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants';
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from 'src/constants/constants';
import { IconProps } from '../types';

export const CloseIcon = ({
Expand Down
12 changes: 8 additions & 4 deletions packages/svg/src/icons/Delete/DeleteIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import { FC } from 'react';
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from 'src/constants/constants';
import { IconProps } from '../types';

export const DeleteIcon: FC<IconProps> = ({ width, height, ...props }) => {
export const DeleteIcon = ({
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"
width={width}
height={height}
{...props}
>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
8 changes: 6 additions & 2 deletions packages/svg/src/icons/Favorite/FavoriteIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { FC } from 'react';
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from 'src/constants/constants';
import { IconProps } from '../types';

export const FavoriteIcon: FC<IconProps> = ({ width, height, ...props }) => {
export const FavoriteIcon = ({
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
...props
}: IconProps): JSX.Element => {
return (
<svg
width={width}
Expand Down
8 changes: 6 additions & 2 deletions packages/svg/src/icons/Save/SaveAsIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { FC } from 'react';
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from 'src/constants/constants';
import { IconProps } from '../types';

export const SaveAsIcon: FC<IconProps> = ({ width, height, ...props }) => {
export const SaveAsIcon = ({
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
...props
}: IconProps): JSX.Element => {
return (
<svg
width={width}
Expand Down

0 comments on commit 697e2f7

Please sign in to comment.