Skip to content

Commit da3dc08

Browse files
authored
fix(BrandFooter): adjust styles (#1114)
* fix(BrandFooter): adjust styles * fix: add storybook
1 parent 75a573b commit da3dc08

File tree

3 files changed

+51
-36
lines changed

3 files changed

+51
-36
lines changed

src/components/BrandFooter/BrandFooter.scss

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ $block: '.#{$ns}brand-footer';
1515
width: 100%;
1616
height: 72px;
1717
margin-top: var(--header-height);
18-
color: var(--g-color-text-secondary);
19-
border-top: $borderHeight solid var(--g-color-line-generic);
18+
box-sizing: content-box;
19+
border-top: $borderHeight solid;
20+
border-bottom: $borderHeight solid transparent;
2021
transition: color 0.5s ease-out, border-color 0.5s ease-out;
2122

2223
&::after {
@@ -25,37 +26,45 @@ $block: '.#{$ns}brand-footer';
2526
right: 0;
2627
left: 0;
2728
height: $borderHeight;
29+
background: linear-gradient(
30+
270deg,
31+
rgba(228, 106, 68, 1) 0%,
32+
rgba(242, 159, 85, 1) 46.62%,
33+
rgba(255, 212, 102, 1) 100%
34+
);
35+
2836
opacity: 0;
2937
transition: opacity 0.5s ease-out;
3038
content: '';
3139
}
3240

33-
&:hover {
34-
color: var(--g-color-text-primary);
35-
border-color: transparent;
36-
37-
&::after {
38-
opacity: 1;
39-
}
40-
}
41-
4241
&_theme {
43-
&_light::after {
44-
background: linear-gradient(
45-
270deg,
46-
rgba(228, 106, 68, 1) 0%,
47-
rgba(242, 159, 85, 1) 46.62%,
48-
rgba(255, 212, 102, 1) 100%
49-
);
42+
&_light {
43+
color: var(--g-color-text-secondary);
44+
border-top-color: var(--g-color-private-black-200);
45+
46+
&:hover {
47+
color: var(--g-color-text-primary);
48+
border-top-color: transparent;
49+
50+
&::after {
51+
opacity: 1;
52+
}
53+
}
5054
}
5155

52-
&_dark::after {
53-
background: linear-gradient(
54-
270deg,
55-
rgba(228, 106, 68, 0.6) 0%,
56-
rgba(242, 159, 85, 0.6) 46.62%,
57-
rgba(255, 212, 102, 0.6) 100%
58-
);
56+
&_dark {
57+
color: var(--g-color-private-white-700);
58+
border-top-color: var(--g-color-private-white-100);
59+
60+
&:hover {
61+
color: var(--g-color-private-white-1000-solid);
62+
border-top-color: transparent;
63+
64+
&::after {
65+
opacity: 0.6;
66+
}
67+
}
5968
}
6069
}
6170

@@ -64,11 +73,6 @@ $block: '.#{$ns}brand-footer';
6473
align-items: center;
6574
justify-content: center;
6675
gap: $indentXXXS;
67-
padding-top: 1px;
68-
}
69-
70-
&__text {
71-
align-self: flex-end;
7276
}
7377

7478
&__brand-icon {
@@ -101,10 +105,7 @@ $block: '.#{$ns}brand-footer';
101105
@include text-body-1();
102106

103107
height: 52px;
104-
105-
&__content {
106-
padding: 0;
107-
}
108+
border-bottom-width: 0;
108109

109110
&__brand-icon {
110111
width: 20px;
@@ -114,7 +115,6 @@ $block: '.#{$ns}brand-footer';
114115
&__brand-name {
115116
width: 72px;
116117
height: 16px;
117-
margin-top: 0;
118118
}
119119
}
120120
}

src/components/BrandFooter/BrandFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const BrandFooter = ({className}: ClassNameProps) => {
2222
return (
2323
<Link className={b({theme}, className)} href="https://gravity-ui.com">
2424
<div className={b('content')}>
25-
<span className={b('text')}>{i18n('created-on')}</span>
25+
<span>{i18n('created-on')}</span>
2626
<div className={b('brand-icon')}>
2727
{theme === Theme.Light ? <BrandIconLight /> : <BrandIconDark />}
2828
</div>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
3+
import {Meta, StoryFn} from '@storybook/react';
4+
5+
import {ClassNameProps} from '../../../models';
6+
import BrandFooter from '../BrandFooter';
7+
8+
export default {
9+
title: 'Components/BrandFooter',
10+
component: BrandFooter,
11+
} as Meta;
12+
13+
export const Default: StoryFn<ClassNameProps> = (args) => <BrandFooter {...args} />;
14+
15+
Default.args = {};

0 commit comments

Comments
 (0)