Skip to content

Commit

Permalink
[CCUBE-1617][MAHI]Use styled componnet for divider and remove mobileo…
Browse files Browse the repository at this point in the history
…nlyborder
  • Loading branch information
mahidhar-reddy09 committed Nov 18, 2024
1 parent 4f37189 commit ff3c656
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
15 changes: 5 additions & 10 deletions src/footer/footer.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from "styled-components";
import { Colour, MediaQuery } from "../theme";
import { Typography } from "../typography";
import { Layout } from "../layout";
import { Divider } from "../divider";

// =============================================================================
// GENERIC
Expand All @@ -19,6 +20,10 @@ export const StyledFooterLink = styled(Typography.LinkSM)`
// TOP SECTION
// =============================================================================

export const FullWidthDivider = styled(Divider)`
width: 100%;
`;

export const TopSection = styled(Layout.Content)`
padding: 4rem 0;
Expand Down Expand Up @@ -107,16 +112,6 @@ export const AddonSection = styled.div`
// BOTTOM SECTION
// =============================================================================

export const MobileOnlyBorder = styled.div`
display: none;
${MediaQuery.MaxWidth.lg} {
display: block;
height: 1px;
background: ${Colour["bg-strong"]};
}
`;

export const BottomSection = styled(Layout.Content)`
padding: 1.375rem 0;
Expand Down
10 changes: 2 additions & 8 deletions src/footer/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import {
BottomSectionContent,
CopyrightSection,
DisclaimerTextLink,
FullWidthDivider,
LinkSection,
LogoSection,
MobileOnlyBorder,
StyledFooterLink,
TopSection,
} from "./footer.style";
import { FooterLinkProps, FooterProps } from "./types";
import { useTheme } from "styled-components";
import { Divider } from "../divider";

export const Footer = <T,>({
children,
Expand Down Expand Up @@ -134,11 +133,7 @@ export const Footer = <T,>({
<TopSection type="grid" stretch={isStretch}>
{component}
</TopSection>
<Divider
style={{
width: "100%",
}}
/>
<FullWidthDivider />
</>
);
}
Expand All @@ -148,7 +143,6 @@ export const Footer = <T,>({
return (
<BaseFooter {...otherProps}>
{renderTopSection()}
<MobileOnlyBorder />
<BottomSection type="grid" stretch={isStretch}>
<BottomSectionContent key="disclaimer">
{renderDisclaimerLinks()}
Expand Down

0 comments on commit ff3c656

Please sign in to comment.