Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: adding spacing prop to icons #28

Merged
merged 4 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconClose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconClose = ({ className, viewBox }: IconsProps) => {
export const IconClose = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 384 512"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" />
Expand Down
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconCopied.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconCopied = ({ className, viewBox }: IconsProps) => {
export const IconCopied = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 24 24"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="m10.933 13.519-2.226-2.226-1.414 1.414 3.774 3.774 5.702-6.84-1.538-1.282z"></path>
Expand Down
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconCopy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconCopy = ({ className, viewBox }: IconsProps) => {
export const IconCopy = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 24 24"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="M20 2H10c-1.103 0-2 .897-2 2v4H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h10c1.103 0 2-.897 2-2v-4h4c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zM4 20V10h10l.002 10H4zm16-6h-4v-4c0-1.103-.897-2-2-2h-4V4h10v10z"></path>
Expand Down
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconDelete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconDelete = ({ className, viewBox }: IconsProps) => {
export const IconDelete = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 448 512"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z" />
Expand Down
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconDog.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import type { IconsProps } from "./IconsTypes";

export const IconDog = ({ className, viewBox }: IconsProps) => {
export const IconDog = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 1200 500"
defaultClassName={"w-full"}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
<g transform="matrix(11.9092 0 0 11.9092 470.0017 250.0009)" id="879221">
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconDogInShield = ({ className, viewBox }: IconsProps) => {
export const IconDogInShield = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 512 512"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM160.9 286.2c4.8 1.2 9.9 1.8 15.1 1.8c35.3 0 64-28.7 64-64V160h44.2c12.1 0 23.2 6.8 28.6 17.7L320 192h64c8.8 0 16 7.2 16 16v32c0 44.2-35.8 80-80 80H272v50.7c0 7.3-5.9 13.3-13.3 13.3c-1.8 0-3.6-.4-5.2-1.1l-98.7-42.3c-6.6-2.8-10.8-9.3-10.8-16.4c0-2.8 .6-5.5 1.9-8l15-30zM160 160h40 8v32 32c0 17.7-14.3 32-32 32s-32-14.3-32-32V176c0-8.8 7.2-16 16-16zm128 48a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z" />
Expand Down
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconEdit = ({ className, viewBox }: IconsProps) => {
export const IconEdit = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 512 512"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z" />
Expand Down
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconRestore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconRestore = ({ className, viewBox }: IconsProps) => {
export const IconRestore = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 512 512"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="M432 64H208c-8.8 0-16 7.2-16 16V96H128V80c0-44.2 35.8-80 80-80H432c44.2 0 80 35.8 80 80V304c0 44.2-35.8 80-80 80H416V320h16c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64H320c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V192zm64 32c0 17.7 14.3 32 32 32H288c17.7 0 32-14.3 32-32s-14.3-32-32-32H96c-17.7 0-32 14.3-32 32z" />
Expand Down
8 changes: 7 additions & 1 deletion packages/ui-components/src/components/Icons/IconSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconSettings = ({ className, viewBox, ...rest }: IconsProps) => {
export const IconSettings = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 448 512"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
Expand Down
9 changes: 8 additions & 1 deletion packages/ui-components/src/components/Icons/IconUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ import { SvgIcon } from "../private/SvgIcon/SvgIcon";
import { defaultIconSize } from "./constants";
import type { IconsProps } from "./IconsTypes";

export const IconUser = ({ className, viewBox }: IconsProps) => {
export const IconUser = ({
className,
viewBox,
spacing,
...rest
}: IconsProps) => {
return (
<SvgIcon
defaultViewBox="0 0 512 512"
defaultClassName={defaultIconSize}
viewBox={viewBox}
className={className}
spacing={spacing}
{...rest}
>
{/* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */}
<path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM164.1 325.5C182 346.2 212.6 368 256 368s74-21.8 91.9-42.5c5.8-6.7 15.9-7.4 22.6-1.6s7.4 15.9 1.6 22.6C349.8 372.1 311.1 400 256 400s-93.8-27.9-116.1-53.5c-5.8-6.7-5.1-16.8 1.6-22.6s16.8-5.1 22.6 1.6zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z" />
Expand Down
3 changes: 3 additions & 0 deletions packages/ui-components/src/components/Icons/IconsTypes.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { SpacingType } from "../../common/commonTypes";

export type IconsProps = {
className?: string;
viewBox?: string;
spacing?: SpacingType;
} & React.SVGAttributes<SVGElement>;
Loading
Loading