Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Title component #1338

Merged
merged 3 commits into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/action-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ $block: #{$fd-namespace}-action-bar;
@include fd-truncate-text();

text-rendering: optimizeLegibility;
font-size: var(--sapFontHeader3Size);
font-family: var(--sapFontHeaderFamily);
color: $fd-action-bar-title-color;
flex-grow: 1;
Expand Down
6 changes: 0 additions & 6 deletions src/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,4 @@ $button: #{$fd-namespace}-button;
color: $fd-dialog-resize-handle-color;
}
}

&__title {
@include fd-reset();

@extend %dialog-title;
}
}
3 changes: 0 additions & 3 deletions src/layout-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ $block: #{$fd-namespace}-layout-panel;
$fd-layout-panel-border-color: transparent !default;
$fd-layout-panel-border-elements-width: var(--sapElement_BorderWidth) !default;
$fd-layout-panel-header-border-color: var(--sapGroup_ContentBorderColor) !default;
$fd-layout-panel-title-color: var(--sapTextColor) !default;
$fd-layout-panel-filters-padding: 0.75rem 1.5rem !default;
$fd-layout-panel-filters-border-color: $fd-layout-panel-header-border-color !default;
$fd-layout-panel-footer-padding: 1rem 1.5rem !default;
Expand Down Expand Up @@ -61,8 +60,6 @@ $block: #{$fd-namespace}-layout-panel;
flex: 1;
margin-bottom: 0;
line-height: normal;
font-size: var(--sapFontLargeSize);
color: $fd-layout-panel-title-color;
}

&__description {
Expand Down
42 changes: 42 additions & 0 deletions src/title.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@import "./mixins";
@import "./dialog-placeholders";

$block: #{$fd-namespace}-title;

.#{$block} {
@include fd-reset();

@extend %dialog-title;

color: var(--sapTextColor);

&--h1 {
font-size: var(--sapFontHeader1Size);
}

&--h2 {
font-size: var(--sapFontHeader2Size);
}

&--h3 {
font-size: var(--sapFontHeader3Size);
}

&--h4 {
font-size: var(--sapFontHeader4Size);
}

&--h5 {
font-size: var(--sapFontHeader5Size);
}

&--h6 {
font-size: var(--sapFontHeader6Size);
}

&--wrap {
overflow: auto;
white-space: normal;
text-overflow: initial;
}
}
186 changes: 148 additions & 38 deletions stories/action-bar/__snapshots__/action-bar.stories.storyshot
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ exports[`Storyshots Components/Action Bar Action bar mobile view 1`] = `
</div>


<h3
<div
class="fd-action-bar__title"
>
Action Bar with description and back button
</h3>


<h1
class="fd-title fd-title--h3"
>
Action Bar with description and back button
</h1>


</div>


<div
Expand Down Expand Up @@ -247,11 +255,19 @@ exports[`Storyshots Components/Action Bar Action bar mobile view 1`] = `
</div>


<h3
<div
class="fd-action-bar__title"
>
Action Bar with description and back button
</h3>


<h1
class="fd-title fd-title--h3"
>
Action Bar with description and back button
</h1>


</div>


<div
Expand Down Expand Up @@ -450,11 +466,19 @@ exports[`Storyshots Components/Action Bar Action bar with Back button and No des
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -524,11 +548,19 @@ exports[`Storyshots Components/Action Bar Action bar with Back button and No des
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -595,7 +627,14 @@ exports[`Storyshots Components/Action Bar Action bar with Long page title and de
<div
class="fd-action-bar__title"
>
Page Title Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Long.


<h1
class="fd-title fd-title--h3"
>
Page Title Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Long.
</h1>


</div>

Expand Down Expand Up @@ -686,7 +725,14 @@ exports[`Storyshots Components/Action Bar Action bar with Long page title and de
<div
class="fd-action-bar__title"
>
Page Title Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Long.


<h1
class="fd-title fd-title--h3"
>
Page Title Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Long.
</h1>


</div>

Expand Down Expand Up @@ -768,11 +814,19 @@ exports[`Storyshots Components/Action Bar Action bar with back button, descripti
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -849,11 +903,19 @@ exports[`Storyshots Components/Action Bar Action bar with back button, descripti
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -925,11 +987,19 @@ exports[`Storyshots Components/Action Bar Action bar with back button, descripti
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -1006,11 +1076,19 @@ exports[`Storyshots Components/Action Bar Action bar with back button, descripti
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -1081,11 +1159,19 @@ exports[`Storyshots Components/Action Bar Action bar with back button, descripti
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -1162,11 +1248,19 @@ exports[`Storyshots Components/Action Bar Action bar with back button, descripti
</div>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -1223,11 +1317,19 @@ exports[`Storyshots Components/Action Bar Action bar with no Back button 1`] = `
>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down Expand Up @@ -1290,11 +1392,19 @@ exports[`Storyshots Components/Action Bar Action bar with no Back button 1`] = `
>


<h3
<div
class="fd-action-bar__title"
>
Page Title
</h3>


<h1
class="fd-title fd-title--h3"
>
Page Title
</h1>


</div>


<div
Expand Down
Loading