Skip to content

Commit

Permalink
SubHeader Title Only & Orders
Browse files Browse the repository at this point in the history
  • Loading branch information
leanormandon committed May 31, 2024
1 parent e8c14fb commit 32d7043
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/Layout/Subheader/Orders/SubheaderOrders.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import SubheaderOrders from './SubheaderOrders.twig';

export default {
title: 'Design System/Layout/Subheader/Orders'
};

export const base = {
render: (args) => SubheaderOrders(args),
args: {
title: 'Mes commandes'
},
argTypes: {}
};
9 changes: 9 additions & 0 deletions components/Layout/Subheader/Orders/SubheaderOrders.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class='Subheader Subheader-orders'>
<div class='container mx-auto flex flex-col items-center'>
<h1 class='Subheader-title'>{{ title }}</h1>
<div class='flex'>
{% include '../../../Molecules/Button/Button.twig' with {text: 'En cours', sharp:true} %}
{% include '../../../Molecules/Button/Button.twig' with {text: 'Historique', sharp:true, variant: 'secondary'} %}
</div>
</div>
</div>
20 changes: 20 additions & 0 deletions components/Layout/Subheader/TitleOnly/SubheaderTitle.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import SubheaderTitle from './SubheaderTitle.twig';

export default {
title: 'Design System/Layout/Subheader/TitleOnly'
};

export const base = {
render: (args) => SubheaderTitle(args),
args: {
position: 'left',
title: 'Nom de la page',
tag: 'h1'
},
argTypes: {
position: {
options: ['left', 'centered'],
control: { type: 'radio' }
}
}
};
6 changes: 6 additions & 0 deletions components/Layout/Subheader/TitleOnly/SubheaderTitle.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% set tag = tag|default('h1') %}
<div class='Subheader Subheader-titleOnly {% if position == 'centered' %}Subheader-centered{% endif %}'>
<div class='container mx-auto'>
<{{ tag }} class='Subheader-title'>{{ title }}</{{ tag }}>
</div>
</div>
34 changes: 34 additions & 0 deletions components/Layout/Subheader/subheader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.Subheader {
background: var(--theme-lighter);
display: flex;
align-items: center;
&-titleOnly {
min-height: rem-convert(340px);
padding: rem-convert(24px 0);
@screen md {
min-height: rem-convert(250px);
padding: rem-convert(32px 0);
}
}
&-orders {
min-height: rem-convert(256px);
padding: rem-convert(24px 0);
@screen md {
min-height: rem-convert(282px);
padding: rem-convert(32px 0);
}
@screen lg {
min-height: rem-convert(282px);
padding: rem-convert(32px 0);
}
}
&-centered {
text-align: center;
@screen lg {
text-align: left;
}
}
&-title {
@apply h1;
}
}

0 comments on commit 32d7043

Please sign in to comment.