Skip to content

Commit

Permalink
feat: extends SVGAttributes from svelte/elements
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokada committed Jul 14, 2024
1 parent e72cc22 commit 4b0750c
Show file tree
Hide file tree
Showing 522 changed files with 5,734 additions and 13,544 deletions.
5 changes: 5 additions & 0 deletions .changeset/fluffy-dragons-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'flowbite-svelte-icons': patch
---

feat: extends SVGAttributes from svelte/elements
33 changes: 9 additions & 24 deletions src/lib/AddressBookOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
type TitleType = {
id?: string;
title?: string;
Expand All @@ -12,18 +14,14 @@
interface BaseProps {
size?: "xs" | "sm" | "md" | "lg" | "xl";
role?: string;
color?: string;
color?: string | undefined | null;
strokeWidth?: string;
withEvents?: boolean;
onclick?: (event: MouseEvent) => void;
onkeydown?: (event: KeyboardEvent) => void;
onkeyup?: (event: KeyboardEvent) => void;
class?: string;
class?: string | undefined | null;
}
interface CtxType extends BaseProps {}
interface Props extends BaseProps{
interface Props extends BaseProps, SVGAttributes<SVGElement> {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
Expand All @@ -41,17 +39,13 @@ strokeWidth?: string;
let {
size = ctx.size || 'md',
role,
color = ctx.color || 'currentColor',
withEvents = ctx.withEvents || false,
title,
strokeWidth= ctx.strokeWidth || "2",
desc,
class: classname,
class: className,
ariaLabel = "address book outline" ,
onclick,
onkeydown,
onkeyup,
...restProps
}: Props = $props();
Expand All @@ -68,15 +62,11 @@ strokeWidth= ctx.strokeWidth || "2",
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
onclick={onclick}
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title?.id && title.title}
<title id={title.id}>{title.title}</title>
Expand All @@ -95,9 +85,8 @@ strokeWidth= ctx.strokeWidth || "2",
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
Expand All @@ -117,16 +106,12 @@ strokeWidth= ctx.strokeWidth || "2",
[Go to docs](https://flowbite-svelte-icons.codewithshin.com/)
## Props
@prop size = ctx.size || 'md'
@prop role
@prop color = ctx.color || 'currentColor'
@prop withEvents = ctx.withEvents || false
@prop title
@prop strokeWidth= ctx.strokeWidth || "2"
@prop desc
@prop class: classname
@prop class: className
@prop ariaLabel = "address book outline"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop ...restProps
-->
37 changes: 11 additions & 26 deletions src/lib/AddressBookSolid.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
type TitleType = {
id?: string;
title?: string;
Expand All @@ -12,17 +14,13 @@
interface BaseProps {
size?: "xs" | "sm" | "md" | "lg" | "xl";
role?: string;
color?: string;
color?: string | undefined | null;
withEvents?: boolean;
onclick?: (event: MouseEvent) => void;
onkeydown?: (event: KeyboardEvent) => void;
onkeyup?: (event: KeyboardEvent) => void;
class?: string;
class?: string | undefined | null;
}
interface CtxType extends BaseProps {}
interface Props extends BaseProps{
interface Props extends BaseProps, SVGAttributes<SVGElement> {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
Expand All @@ -40,16 +38,12 @@
let {
size = ctx.size || 'md',
role,
color = ctx.color || 'currentColor',
withEvents = ctx.withEvents || false,
title,
desc,
class: classname,
ariaLabel = "address book solid" ,
onclick,
onkeydown,
onkeyup,
class: className,
ariaLabel = "address book outline" ,
...restProps
}: Props = $props();
Expand All @@ -65,15 +59,11 @@
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
onclick={onclick}
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title?.id && title.title}
<title id={title.id}>{title.title}</title>
Expand All @@ -91,9 +81,8 @@
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
Expand All @@ -113,15 +102,11 @@
[Go to docs](https://flowbite-svelte-icons.codewithshin.com/)
## Props
@prop size = ctx.size || 'md'
@prop role
@prop color = ctx.color || 'currentColor'
@prop withEvents = ctx.withEvents || false
@prop title
@prop desc
@prop class: classname
@prop ariaLabel = "address book solid"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop class: className
@prop ariaLabel = "address book outline"
@prop ...restProps
-->
37 changes: 11 additions & 26 deletions src/lib/AdjustmentsHorizontalOutline.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
type TitleType = {
id?: string;
title?: string;
Expand All @@ -12,18 +14,14 @@
interface BaseProps {
size?: "xs" | "sm" | "md" | "lg" | "xl";
role?: string;
color?: string;
color?: string | undefined | null;
strokeWidth?: string;
withEvents?: boolean;
onclick?: (event: MouseEvent) => void;
onkeydown?: (event: KeyboardEvent) => void;
onkeyup?: (event: KeyboardEvent) => void;
class?: string;
class?: string | undefined | null;
}
interface CtxType extends BaseProps {}
interface Props extends BaseProps{
interface Props extends BaseProps, SVGAttributes<SVGElement> {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
Expand All @@ -41,17 +39,13 @@ strokeWidth?: string;
let {
size = ctx.size || 'md',
role,
color = ctx.color || 'currentColor',
withEvents = ctx.withEvents || false,
title,
strokeWidth= ctx.strokeWidth || "2",
desc,
class: classname,
ariaLabel = "adjustments horizontal outline" ,
onclick,
onkeydown,
onkeyup,
class: className,
ariaLabel = "address book outline" ,
...restProps
}: Props = $props();
Expand All @@ -68,15 +62,11 @@ strokeWidth= ctx.strokeWidth || "2",
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
onclick={onclick}
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title?.id && title.title}
<title id={title.id}>{title.title}</title>
Expand All @@ -95,9 +85,8 @@ strokeWidth= ctx.strokeWidth || "2",
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
Expand All @@ -117,16 +106,12 @@ strokeWidth= ctx.strokeWidth || "2",
[Go to docs](https://flowbite-svelte-icons.codewithshin.com/)
## Props
@prop size = ctx.size || 'md'
@prop role
@prop color = ctx.color || 'currentColor'
@prop withEvents = ctx.withEvents || false
@prop title
@prop strokeWidth= ctx.strokeWidth || "2"
@prop desc
@prop class: classname
@prop ariaLabel = "adjustments horizontal outline"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop class: className
@prop ariaLabel = "address book outline"
@prop ...restProps
-->
37 changes: 11 additions & 26 deletions src/lib/AdjustmentsHorizontalSolid.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script lang="ts">
import { getContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import type { SVGAttributes } from 'svelte/elements';
type TitleType = {
id?: string;
title?: string;
Expand All @@ -12,17 +14,13 @@
interface BaseProps {
size?: "xs" | "sm" | "md" | "lg" | "xl";
role?: string;
color?: string;
color?: string | undefined | null;
withEvents?: boolean;
onclick?: (event: MouseEvent) => void;
onkeydown?: (event: KeyboardEvent) => void;
onkeyup?: (event: KeyboardEvent) => void;
class?: string;
class?: string | undefined | null;
}
interface CtxType extends BaseProps {}
interface Props extends BaseProps{
interface Props extends BaseProps, SVGAttributes<SVGElement> {
title?: TitleType;
desc?: DescType;
ariaLabel?: string;
Expand All @@ -40,16 +38,12 @@
let {
size = ctx.size || 'md',
role,
color = ctx.color || 'currentColor',
withEvents = ctx.withEvents || false,
title,
desc,
class: classname,
ariaLabel = "adjustments horizontal solid" ,
onclick,
onkeydown,
onkeyup,
class: className,
ariaLabel = "address book outline" ,
...restProps
}: Props = $props();
Expand All @@ -65,15 +59,11 @@
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
onclick={onclick}
onkeydown={onkeydown}
onkeyup={onkeyup}
>
{#if title?.id && title.title}
<title id={title.id}>{title.title}</title>
Expand All @@ -91,9 +81,8 @@
class={twMerge(
'shrink-0',
sizes[size],
classname
className
)}
{role}
aria-label={ariaLabel}
aria-describedby={hasDescription ? ariaDescribedby : undefined}
viewBox="0 0 24 24"
Expand All @@ -113,15 +102,11 @@
[Go to docs](https://flowbite-svelte-icons.codewithshin.com/)
## Props
@prop size = ctx.size || 'md'
@prop role
@prop color = ctx.color || 'currentColor'
@prop withEvents = ctx.withEvents || false
@prop title
@prop desc
@prop class: classname
@prop ariaLabel = "adjustments horizontal solid"
@prop onclick
@prop onkeydown
@prop onkeyup
@prop class: className
@prop ariaLabel = "address book outline"
@prop ...restProps
-->
Loading

0 comments on commit 4b0750c

Please sign in to comment.