Skip to content

Commit

Permalink
Added page stories and icon className
Browse files Browse the repository at this point in the history
  • Loading branch information
MRita443 committed Aug 8, 2023
1 parent 286c74a commit 5e7548f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/lib/component/Icon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
export let src: string | { a: { viewBox: string }; c: string } | undefined;
export let href: string | undefined = undefined;
export let color: string | undefined;
export let color: string | undefined = undefined;
export let size: string | undefined;
export let ariaLabel: string | undefined = undefined;
export let className: string | undefined = undefined;
</script>

{#if href}
<a {href} target="_blank" rel="noreferrer" class="w-min" aria-label={ariaLabel}>
<Icon {src} {color} {size} />
<Icon {src} {color} {size} {className} />
</a>
{:else}
<Icon {src} {size} color="currentcolor" className={$$props.color} />
<Icon {src} {color} {size} {className} />
{/if}
2 changes: 1 addition & 1 deletion src/lib/component/VariableVisibilityInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
class="z-40 col-start-2 col-end-3 row-start-1 mr-4"
on:click={() => (visible = !visible)}
>
<Icon src={icon} size="1.5em" color="fill-rose-950/[.54]" />
<Icon src={icon} size="1.5em" className="fill-rose-950/[.54]" />
</button>
</div>
2 changes: 1 addition & 1 deletion src/lib/layout/MemberButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
>
<p class="w-full whitespace-nowrap pl-2 font-source_code text-sm text-white">Área Membro</p>
<div class="rounded-md bg-muted-red-400 px-1 pt-1">
<Icon src={Icons.User} color="fill-rose-950" size="32px" />
<Icon src={Icons.User} color="#411315" size="32px" />
</div>
</a>
3 changes: 2 additions & 1 deletion src/routes/layout.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default {
title: 'Organisms/Layout',
component: Layout,
parameters: {
layout: 'fullscreen'
layout: 'fullscreen',
backgrounds: { default: 'transparent' }
},
decorators: [() => LayoutDecorator]
};
Expand Down
15 changes: 15 additions & 0 deletions src/routes/login/page.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Layout from '../+layout.svelte';
import Page from './+page.svelte';
import LayoutDecorator from '$lib/storybook-utils/LayoutDecorator.svelte';

export default {
title: 'Pages/Login',
component: Page,
parameters: {
layout: 'fullscreen',
backgrounds: { default: 'clear' }
},
decorators: [() => Layout, () => LayoutDecorator]
};

export const Login = {};
3 changes: 2 additions & 1 deletion src/routes/page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export default {
title: 'Pages/HomePage',
component: Page,
parameters: {
layout: 'fullscreen'
layout: 'fullscreen',
backgrounds: { default: 'transparent' }
},
decorators: [() => Layout, () => LayoutDecorator]
};
Expand Down

0 comments on commit 5e7548f

Please sign in to comment.