generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from nebula-aac/group-icons
[svg] group icons
- Loading branch information
Showing
41 changed files
with
356 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'jsdom', | ||
coverageThreshold: { | ||
global: { | ||
branches: 80, | ||
functions: 80, | ||
lines: 80, | ||
statements: 80, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { render } from '@testing-library/react'; | ||
import { AddIcon } from '../icons'; | ||
|
||
describe('AddIcon', () => { | ||
it('renders without errors', () => { | ||
render(<AddIcon width={24} height={24} />); | ||
}); | ||
|
||
it('applies width and height', () => { | ||
const { getByTestId } = render(<AddIcon width={24} height={24} />); | ||
const svgElement = getByTestId('add-icon-svg'); | ||
expect(svgElement.getAttribute('width')).toBe('24'); | ||
expect(svgElement.getAttribute('height')).toBe('24'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { FC } from 'react'; | ||
import { IconProps } from '../types'; | ||
import { DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FILL_NONE } from '../../constants/constants'; | ||
|
||
export const AddIcon: FC<IconProps> = ({ | ||
width = DEFAULT_WIDTH, | ||
height = DEFAULT_HEIGHT, | ||
fill = DEFAULT_FILL_NONE, | ||
...props | ||
}) => { | ||
return ( | ||
<svg | ||
width={width} | ||
height={height} | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 24 24" | ||
data-testid="add-icon-svg" | ||
{...props} | ||
> | ||
<path d="M0 0h24v24H0z" fill={fill} /> | ||
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default AddIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { FC } from 'react'; | ||
import { IconProps } from '../types'; | ||
import { DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FILL_NONE } from '../../constants/constants'; | ||
|
||
export const AddIconCircleBordered: FC<IconProps> = ({ | ||
width = DEFAULT_WIDTH, | ||
height = DEFAULT_HEIGHT, | ||
fill = DEFAULT_FILL_NONE, | ||
...props | ||
}) => { | ||
return ( | ||
<svg | ||
width={width} | ||
height={height} | ||
viewBox="0 0 48 48" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path d="M0 0h48v48h-48z" fill={fill} /> | ||
<path d="M26 14h-4v8h-8v4h8v8h4v-8h8v-4h-8v-8zm-2-10c-11.05 0-20 8.95-20 20s8.95 20 20 20 20-8.95 20-20-8.95-20-20-20zm0 36c-8.82 0-16-7.18-16-16s7.18-16 16-16 16 7.18 16 16-7.18 16-16 16z" /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default AddIconCircleBordered; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as AddIcon } from './AddIcon'; | ||
export { default as AddIconCircleBordered } from './AddIconCircleBordered'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { FC } from 'react'; | ||
import { IconProps } from '../types'; | ||
import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from '../../constants/constants'; | ||
|
||
export const BellIcon: FC<IconProps> = ({ | ||
width = DEFAULT_WIDTH, | ||
height = DEFAULT_HEIGHT, | ||
...props | ||
}) => { | ||
return ( | ||
<svg | ||
width={width} | ||
height={height} | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 24 24" | ||
{...props} | ||
> | ||
<path d="M12 22c1.1 0 2-.9 2-2h-4a2 2 0 0 0 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z" /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default BellIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as BellIcon } from './BellIcon'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
9 changes: 7 additions & 2 deletions
9
packages/svg/src/icons/ChatIcon.tsx → packages/svg/src/icons/Chat/ChatIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as ChatIcon } from './ChatIcon'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { FC } from 'react'; | ||
import { IconProps } from '../types'; | ||
import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from '../../constants/constants'; | ||
|
||
export const CloneIcon: FC<IconProps> = ({ | ||
width = DEFAULT_WIDTH, | ||
height = DEFAULT_HEIGHT, | ||
...props | ||
}) => { | ||
return ( | ||
<svg | ||
width={width} | ||
height={height} | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 16 16" | ||
{...props} | ||
> | ||
<path d="M14.5 0h-10A1.5 1.5 0 0 0 3 1.5V3H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V13h1.5a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 14.5 0Zm-3.188 14.5H1.688a.188.188 0 0 1-.188-.188V4.688a.187.187 0 0 1 .188-.188H3v7A1.5 1.5 0 0 0 4.5 13h7v1.313a.188.188 0 0 1-.188.187Zm3-3H4.688a.188.188 0 0 1-.188-.188V1.688a.187.187 0 0 1 .188-.188h9.625a.188.188 0 0 1 .187.188v9.624a.188.188 0 0 1-.188.188Z" /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default CloneIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as CloneIcon } from './CloneIcon'; |
This file was deleted.
Oops, something went wrong.
13 changes: 8 additions & 5 deletions
13
packages/svg/src/icons/CloudSavedIcon.tsx → ...es/svg/src/icons/Cloud/CloudSavedIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as CloudSavedIcon } from './CloudSavedIcon'; |
Oops, something went wrong.