From ed1687b7a5a193d5f2d5a4df6a5320447e8ba821 Mon Sep 17 00:00:00 2001 From: Zain Fathoni Date: Sun, 6 Aug 2023 14:49:30 +0800 Subject: [PATCH] refactor(icons): replace Duotone House inline SVG with SVG sprites --- app/components/breadcrumbs.tsx | 10 +++++-- app/components/icons.tsx | 25 +++++++++++++++++ app/icons/duotone.tsx | 21 -------------- public/images/duotone.svg | 51 ++++++++++++++++++++++++++++++++++ public/images/light.svg | 15 ++++++++++ public/images/solid.svg | 6 ++++ 6 files changed, 104 insertions(+), 24 deletions(-) create mode 100644 app/components/icons.tsx create mode 100644 public/images/duotone.svg create mode 100644 public/images/light.svg create mode 100644 public/images/solid.svg diff --git a/app/components/breadcrumbs.tsx b/app/components/breadcrumbs.tsx index 335c8a8..55f0c37 100644 --- a/app/components/breadcrumbs.tsx +++ b/app/components/breadcrumbs.tsx @@ -1,7 +1,7 @@ -import * as React from 'react' import { Link, useMatches } from '@remix-run/react' +import * as React from 'react' import { categoriesRecord } from '../model/categories' -import { House } from '../icons/duotone' +import { Duotone } from './icons' export default function Breadcrumbs() { const matches = useMatches() @@ -15,7 +15,11 @@ export default function Breadcrumbs() {
  • -
    diff --git a/app/components/icons.tsx b/app/components/icons.tsx new file mode 100644 index 0000000..1249e25 --- /dev/null +++ b/app/components/icons.tsx @@ -0,0 +1,25 @@ +import * as React from 'react' + +export function Duotone({ id, ...props }) { + return ( + + + + ) +} + +export function Light({ id, ...props }) { + return ( + + + + ) +} + +export function Solid({ id, ...props }) { + return ( + + + + ) +} diff --git a/app/icons/duotone.tsx b/app/icons/duotone.tsx index e2a3504..1098cb4 100644 --- a/app/icons/duotone.tsx +++ b/app/icons/duotone.tsx @@ -124,27 +124,6 @@ export const PenToSquare = (props: React.SVGProps) => ( ) -export const House = (props: React.SVGProps) => ( - - - - -) - export const ChildReaching = (props: React.SVGProps) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/light.svg b/public/images/light.svg new file mode 100644 index 0000000..e8b508e --- /dev/null +++ b/public/images/light.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/images/solid.svg b/public/images/solid.svg new file mode 100644 index 0000000..e3fb715 --- /dev/null +++ b/public/images/solid.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file