diff --git a/src/components/Icons/index.ts b/src/components/Icons/index.ts index 8f311db..c4360ee 100644 --- a/src/components/Icons/index.ts +++ b/src/components/Icons/index.ts @@ -2,4 +2,5 @@ export { default as Arrow2Icon } from './Arrow2/Arrow2.astro'; export { default as ProfileIcon } from './profile/profile.astro'; export { default as ShareIcon } from './share/share.astro'; export { default as SearchIcon } from './search/search.astro'; -export { default as CloseIcon } from './close/close.astro'; \ No newline at end of file +export { default as CloseIcon } from './close/close.astro'; +export { default as UploadIcon } from './upload/upload.astro'; \ No newline at end of file diff --git a/src/components/Icons/upload/svgs/upload-16.svg b/src/components/Icons/upload/svgs/upload-16.svg new file mode 100644 index 0000000..2385683 --- /dev/null +++ b/src/components/Icons/upload/svgs/upload-16.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Icons/upload/svgs/upload-24.svg b/src/components/Icons/upload/svgs/upload-24.svg new file mode 100644 index 0000000..41ec685 --- /dev/null +++ b/src/components/Icons/upload/svgs/upload-24.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Icons/upload/svgs/upload-32.svg b/src/components/Icons/upload/svgs/upload-32.svg new file mode 100644 index 0000000..79bad19 --- /dev/null +++ b/src/components/Icons/upload/svgs/upload-32.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Icons/upload/upload.astro b/src/components/Icons/upload/upload.astro new file mode 100644 index 0000000..af4152f --- /dev/null +++ b/src/components/Icons/upload/upload.astro @@ -0,0 +1,27 @@ +--- +import upload16 from './svgs/upload-16.svg?raw'; +import upload24 from './svgs/upload-24.svg?raw'; +import upload32 from './svgs/upload-32.svg?raw'; + +export interface Props { + size: 16 | 24 | 32; + label?: string; + class?: string; +} + +const { size = 24, label, class: className } = Astro.props; + +let raw: string; +if (size === 16 ) raw = upload16; +else if (size === 24 ) raw = upload24; +else if (size === 32 ) raw = upload32; +else raw = ''; // Fallback to a blank string if no match is found, though this should not happen due to the type constraints on size. + + +const classes = ['nds-icon-upload', className].filter(Boolean).join(' '); +const svg = raw + .replace(/fill="#[A-Fa-f0-9]{3,8}"/g, 'fill="currentColor"') + .replace(' diff --git a/src/pages/index.astro b/src/pages/index.astro index b36f4d4..ca4c8b2 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,6 +1,6 @@ --- import Layout from '../layouts/Layout.astro'; -import { Arrow2Icon, ProfileIcon, ShareIcon, SearchIcon, CloseIcon } from '../components/Icons/index.ts'; +import { Arrow2Icon, ProfileIcon, ShareIcon, SearchIcon, CloseIcon, UploadIcon } from '../components/Icons/index.ts'; --- @@ -47,6 +47,11 @@ import { Arrow2Icon, ProfileIcon, ShareIcon, SearchIcon, CloseIcon } from '../co +
+ + + +