From 91d4822e6d43e8e2af8f4297867fd78fd158ab8e Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 11 Nov 2024 11:13:48 +0100 Subject: [PATCH 1/2] Update lock icon --- images/icons/lock.svg | 11 +++-------- src/components/icons/Lock.tsx | 16 +++++++++------- src/components/icons/LockAlt.tsx | 1 + src/components/icons/LockAltFilled.tsx | 1 + .../components/patterns/data/IconsPage.tsx | 11 ++++++++++- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/images/icons/lock.svg b/images/icons/lock.svg index f309484f7..7b5f679b3 100644 --- a/images/icons/lock.svg +++ b/images/icons/lock.svg @@ -1,8 +1,3 @@ - - - - - - - - \ No newline at end of file + + + diff --git a/src/components/icons/Lock.tsx b/src/components/icons/Lock.tsx index 16e44c74b..9045d411f 100644 --- a/src/components/icons/Lock.tsx +++ b/src/components/icons/Lock.tsx @@ -10,16 +10,18 @@ export default function LockIcon(props: LockIconProps) { return ( - - - - + ); } diff --git a/src/components/icons/LockAlt.tsx b/src/components/icons/LockAlt.tsx index cfbc3cec4..3374ed238 100644 --- a/src/components/icons/LockAlt.tsx +++ b/src/components/icons/LockAlt.tsx @@ -5,6 +5,7 @@ export type LockAltIconProps = JSX.SVGAttributes; /** * Icon generated from lock-alt.svg + * @deprecated */ export default function LockAltIcon(props: LockAltIconProps) { return ( diff --git a/src/components/icons/LockAltFilled.tsx b/src/components/icons/LockAltFilled.tsx index 21db30774..ac4212ab1 100644 --- a/src/components/icons/LockAltFilled.tsx +++ b/src/components/icons/LockAltFilled.tsx @@ -5,6 +5,7 @@ export type LockAltFilledIconProps = JSX.SVGAttributes; /** * Icon generated from lock-alt-filled.svg + * @deprecated */ export default function LockAltFilledIcon(props: LockAltFilledIconProps) { return ( diff --git a/src/pattern-library/components/patterns/data/IconsPage.tsx b/src/pattern-library/components/patterns/data/IconsPage.tsx index 63d339ab5..d51bece4b 100644 --- a/src/pattern-library/components/patterns/data/IconsPage.tsx +++ b/src/pattern-library/components/patterns/data/IconsPage.tsx @@ -1,7 +1,11 @@ +import classnames from 'classnames'; + import { Link } from '../../../../'; import * as Icons from '../../../../components/icons'; import Library from '../../Library'; +const deprecatedIcons = [Icons.LockAltIcon, Icons.LockAltFilledIcon]; + export default function IconsPage() { return ( + Deprecated icons are greyed-out.
{(Object.keys(Icons) as Array).map(iconName => { const IconComponent = Icons[iconName]; + const isDeprecated = deprecatedIcons.includes(IconComponent); return (
From 0d148a94d311de9c74cc28b3231cdf2e76074ec4 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 11 Nov 2024 12:13:58 +0100 Subject: [PATCH 2/2] Add new globe-with-lock icon --- images/icons/globe-alt-lock.svg | 4 ++++ src/components/icons/GlobeAltLock.tsx | 34 +++++++++++++++++++++++++++ src/components/icons/index.ts | 1 + 3 files changed, 39 insertions(+) create mode 100644 images/icons/globe-alt-lock.svg create mode 100644 src/components/icons/GlobeAltLock.tsx diff --git a/images/icons/globe-alt-lock.svg b/images/icons/globe-alt-lock.svg new file mode 100644 index 000000000..7b9231efd --- /dev/null +++ b/images/icons/globe-alt-lock.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/icons/GlobeAltLock.tsx b/src/components/icons/GlobeAltLock.tsx new file mode 100644 index 000000000..6415a535b --- /dev/null +++ b/src/components/icons/GlobeAltLock.tsx @@ -0,0 +1,34 @@ +// This file was auto-generated using scripts/generate-icons.js +import type { JSX } from 'preact'; + +export type GlobeAltLockIconProps = JSX.SVGAttributes; + +/** + * Icon generated from globe-alt-lock.svg + */ +export default function GlobeAltLockIcon(props: GlobeAltLockIconProps) { + return ( + + + + + ); +} diff --git a/src/components/icons/index.ts b/src/components/icons/index.ts index dcad838b5..77e427878 100644 --- a/src/components/icons/index.ts +++ b/src/components/icons/index.ts @@ -57,6 +57,7 @@ export { default as FolderOpenIcon } from './FolderOpen'; export { default as FolderOpenFilledIcon } from './FolderOpenFilled'; export { default as GlobeIcon } from './Globe'; export { default as GlobeAltIcon } from './GlobeAlt'; +export { default as GlobeAltLockIcon } from './GlobeAltLock'; export { default as GoogleDriveIcon } from './GoogleDrive'; export { default as GroupsIcon } from './Groups'; export { default as GroupsFilledIcon } from './GroupsFilled';