Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
feat: update logo with customsrc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukicenturi committed Aug 14, 2023
1 parent 70c4413 commit 7ef4ac7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/components/logos/Logo.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Meta, type StoryFn, type StoryObj } from '@storybook/vue';
import { type Meta, type StoryFn, type StoryObj } from '@storybook/vue3';
import { default as Logo, type Props } from './Logo.vue';

const render: StoryFn<Props> = (args) => ({
Expand Down Expand Up @@ -31,4 +31,11 @@ export const WithText: Story = {
},
};

export const WithCustomSrc: Story = {
args: {
customSrc:
'https://raw.githubusercontent.com/rotki/data/hohoho/assets/icons/drawer_logo.png',
},
};

export default meta;
10 changes: 8 additions & 2 deletions src/components/logos/Logo.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<script setup lang="ts">
import logo from './logo.svg';
export interface Props {
text?: boolean;
customSrc?: string;
}
defineOptions({
Expand All @@ -9,12 +12,15 @@ defineOptions({
withDefaults(defineProps<Props>(), {
text: false,
customSrc: undefined,
});
</script>

<template>
<div class="h-12 space-x-4 flex items-center">
<img class="h-full" src="./logo.svg" alt="Rotki" />
<div v-if="text" class="text-h4 text-rui-light-primary">rotki</div>
<img class="h-full" :src="customSrc ?? logo" alt="Rotki" />
<div v-if="text" class="text-h4 text-rui-light-primary dark:text-white">
rotki
</div>
</div>
</template>

0 comments on commit 7ef4ac7

Please sign in to comment.