Skip to content

Commit

Permalink
Merge pull request #208 from CSSSR/release/core-22
Browse files Browse the repository at this point in the history
Release: Core-22
  • Loading branch information
maksim-kononov-csssr authored Jun 8, 2021
2 parents de8d915 + b049d04 commit b2ff181
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 106 deletions.
4 changes: 4 additions & 0 deletions packages/core-design/.storybook/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export const base = css`
margin: 0;
padding: 0;
}
/* padding: 1rem; мешал при тестировании компонентов */
.sb-show-main.sb-main-padded {
padding: 0;
}
html:not(.disable-smooth-scroll) {
scroll-behavior: smooth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const base = (props: ThemeProps) => {

return css`
& {
margin-top: ${calcRem(11)};
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const base = (props: ThemeProps) => {
return css`
& {
display: flex;
z-index: 2;
}
.title {
Expand Down Expand Up @@ -56,12 +57,13 @@ const base = (props: ThemeProps) => {
}
.phone {
margin-top: ${calcRem(8)};
font-weight: 300;
}
.phone,
.time,
.status {
margin-top: ${calcRem(8)};
margin-top: ${calcRem(6)};
}
.address-item {
Expand All @@ -73,34 +75,29 @@ const base = (props: ThemeProps) => {
}
.address-item:nth-of-type(2) {
margin-right: ${calcRem(40)};
margin-right: ${calcRem(42)};
}
.address-item:nth-of-type(3) {
margin-top: ${calcRem(86)};
margin-right: ${calcRem(72)};
margin-right: ${calcRem(83)};
}
.address-item:nth-of-type(3) .address {
margin-top: ${calcRem(0)};
margin-top: 0;
}
.address,
.phone,
.status,
.time {
.phone {
font-weight: 400;
font-size: ${calcRem(14)};
line-height: ${calcRem(22)};
}
}
${desktop.s} {
.address-item:not(:last-of-type) {
margin-right: ${calcRem(40)};
}
.address-item:first-of-type {
margin-right: ${calcRem(50)};
.status,
.time {
font-size: ${calcRem(14)};
line-height: ${calcRem(24)};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ const base = (props: ThemeProps) => {
.map-wrapper {
margin-left: auto;
position: relative;
z-index: 1;
}
.map {
position: relative;
position: absolute;
top: 0;
right: 0;
}
.picture {
Expand Down Expand Up @@ -77,86 +81,59 @@ const base = (props: ThemeProps) => {
}
${desktop.all} {
.picture {
& {
padding-right: ${calcRem(52)};
}
.map {
width: 492px;
height: 280px;
}
}
${desktop.l} {
& {
padding-right: ${calcRem(42)};
.picture {
width: 492px;
height: 280px;
}
.pin_singapore {
top: 41%;
top: 40%;
right: 14.5%;
}
.pin_estonia {
top: 21%;
top: 15.7%;
right: 36%;
}
.pin_russia,
.pin_russia_2 {
top: 26%;
right: 30%;
top: 22%;
right: 31.7%;
}
}
${desktop.m} {
& {
padding-top: ${calcRem(59)};
padding-right: ${calcRem(48)};
}
.pin_singapore {
top: 42%;
right: 15%;
}
.pin_estonia {
top: 20%;
right: 36%;
}
.pin_russia,
.pin_russia_2 {
top: 25%;
right: 30%;
}
}
${desktop.s} {
.pin_singapore {
top: 41%;
right: 15%;
}
.pin_estonia {
top: 16%;
right: 36%;
}
.pin_russia,
.pin_russia_2 {
top: 23%;
right: 31%;
}
}
${tablet.all} {
& {
padding-top: ${calcRem(41)};
padding-right: ${calcRem(21)};
padding-right: ${calcRem(32)};
padding-bottom: ${calcRem(29)};
padding-left: ${calcRem(30)};
}
.map {
width: ${calcRem(424)};
height: ${calcRem(242)};
}
.picture {
width: ${calcRem(386)};
height: ${calcRem(225)};
width: ${calcRem(424)};
height: ${calcRem(242)};
}
.pin_singapore {
Expand Down Expand Up @@ -185,6 +162,10 @@ const base = (props: ThemeProps) => {
flex-direction: column;
}
.map {
position: relative;
}
.picture {
margin-top: ${calcRem(22)};
width: ${calcRem(328)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ storiesOf('Footer', module)
.addDecorator(withKnobs)
.add('Footer', () => {
const knobs = {
preset: select('Preset', ['defaultEn', 'defaultRu', ''], 'defaultEn'),
preset: select('Preset', ['defaultEn', 'defaultRu'], 'defaultEn'),
isIe11: boolean('Is IE11', false),
isMobile: boolean('Is Mobile', false),
actionPhrase: text('Action phrase', ''),
email: text('Email', ''),
baseNavUrl: text('baseNavUrl', 'https://csssr.com'),
}

const videoKnobs = {
Expand Down
22 changes: 17 additions & 5 deletions packages/core-design/src/components/Footer/Footer.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const base = (props: ThemeProps) => {

return css`
& {
background-color: red;
position: relative;
margin-bottom: ${calcRem(344)};
padding-top: ${calcRem(32)};
Expand All @@ -17,9 +16,9 @@ const base = (props: ThemeProps) => {
padding-left: ${calcRem(32)};
display: flex;
flex-direction: column;
height: ${calcRem(344)};
height: ${calcRem(358)};
background-color: white;
box-shadow: 0px 8px 12px rgba(50, 60, 72, 0.15);
box-shadow: 0px 12px 12px rgba(50, 60, 72, 0.15);
overflow: hidden;
}
Expand Down Expand Up @@ -51,7 +50,6 @@ const base = (props: ThemeProps) => {
.email-container {
display: flex;
align-items: baseline;
margin-top: ${calcRem(16)};
}
.email-wrapper {
Expand Down Expand Up @@ -127,14 +125,24 @@ const base = (props: ThemeProps) => {
}
}
${desktop.all} {
.bottom-content {
margin-top: 16px;
}
}
${desktop.s} {
padding-right: ${calcRem(52)};
}
${tablet.all} {
& {
margin-bottom: ${calcRem(288)};
padding-right: ${calcRem(41)};
padding-right: ${calcRem(32)};
}
.bottom-content {
margin-top: ${calcRem(16)};
}
}
Expand Down Expand Up @@ -195,6 +203,10 @@ const base = (props: ThemeProps) => {
margin-right: ${calcRem(32)};
}
.email {
margin-top: 0;
}
.copy-message {
bottom: ${calcRem(-18)};
left: 50%;
Expand Down
3 changes: 2 additions & 1 deletion packages/core-design/src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const Footer: React.FC<Props> = ({
nav: navFromProps,
addresses: addressesFromProps,
preset,
baseNavUrl = '',
}) => {
const [isMessageShown, setIsMessageShown] = useState(false)
const [IsDoubleBottomVisible, setDoubleBottomVisibility] = useState(false)
Expand Down Expand Up @@ -116,7 +117,7 @@ const Footer: React.FC<Props> = ({
const privacyPolicyLink = privacyPolicyLinkFromProps || presets[preset]?.privacyPolicyLink
const cookiesPolicyLink = cookiesPolicyLinkFromProps || presets[preset]?.cookiesPolicyLink
const socialLinks = socialLinksFromProps || presets[preset]?.socialLinks
const nav = navFromProps || presets[preset]?.nav
const nav = navFromProps || presets[preset]?.nav(baseNavUrl)
const addresses = addressesFromProps || presets[preset]?.addresses

const LinkComponent = logo.linkComponent || 'a'
Expand Down
4 changes: 2 additions & 2 deletions packages/core-design/src/components/Footer/Nav/Nav.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const base = (props: Props & ThemeProps) => {
${desktop.m} {
& {
width: ${navSectionsNumber === 4 ? '622px' : '752px'};
width: ${navSectionsNumber === 4 ? '622px' : '741px'};
}
}
${desktop.s} {
& {
margin-right: 50px;
width: ${navSectionsNumber === 4 ? '655px' : '785px'};
width: ${navSectionsNumber === 4 ? '655px' : '781px'};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ const base = (props: ThemeProps) => {
}
${mobile.all} {
margin-top: ${calcRem(41)};
margin-top: ${calcRem(39)};
margin-left: auto;
margin-right: auto;
max-width: ${calcRem(168)};
max-width: ${calcRem(194)};
flex-wrap: wrap;
li {
Expand Down
1 change: 1 addition & 0 deletions packages/core-design/src/components/Footer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ export interface FooterProps {
addresses?: AddressesProps[]
nav?: NavProps[]
preset?: '' | 'defaultEn' | 'defaultRu'
baseNavUrl?: string
}
Loading

0 comments on commit b2ff181

Please sign in to comment.