Skip to content

Commit

Permalink
Merge pull request #33 from thelia/feat/logo
Browse files Browse the repository at this point in the history
feat/logo
  • Loading branch information
Lucanis authored Jun 24, 2024
2 parents c09994f + 9abb3a8 commit f46248f
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 0 deletions.
13 changes: 13 additions & 0 deletions assets/images/placeholder-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/images/thelia-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/images/thelia-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions components/Atoms/Logos/Logo.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import Logo from './Logo.twig';

export default {
title: 'Design System/Atoms/Logos'
};

export const logo = {
render: (args) => Logo(args),
parameters: {
layout: 'centered',
backgrounds: {
default: 'light',
values: [
{
name: 'light',
value: '#FFFFFF',
},
{
name: 'dark',
value: '#282828',
},
],
},
},
args: {
type: 'thelia',
theme: 'dark',
path: '/images/placeholder-logo.svg',
alt: 'Thelia Logo',
},
argTypes: {
type: {
options: ['placeholder', 'thelia'],
control: { type: 'radio' },
defaultValue: 'placeholder',
},
theme: {
options: ['light', 'dark'],
control: { type: 'radio' },
defaultValue: 'light',
description: 'Select the theme for the Thelia Logotype',
if: { arg: 'type', eq: 'thelia' },
},
path: {
control: 'text',
description: 'Path to the logo image'
},
alt: {
control: 'text',
description: 'Alternative text for the logo image',
defaultValue: 'Placeholder Logo',
},
}
};
11 changes: 11 additions & 0 deletions components/Atoms/Logos/Logo.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class='w-56 h-7' role='img' aria-label='Placeholder Logo'>
{% if type == 'placeholder' %}
<img class='w-full h-full' src="{{ path | default('/images/placeholder-logo.svg') }}" alt="{{ alt | default('Placeholder Logo')}}">
{% elseif type == 'thelia' %}
{% if theme == 'dark' %}
<img class='w-full h-full' src='/images/thelia-black.svg' alt='Logo Thelia'>
{% else %}
<img class='w-full h-full' src='/images/thelia-white.svg' alt='Logo Thelia'>
{% endif %}
{% endif %}
</div>

0 comments on commit f46248f

Please sign in to comment.