Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-figma committed Jun 1, 2024
1 parent 50b3909 commit a59b7fa
Show file tree
Hide file tree
Showing 15 changed files with 316 additions and 3,395 deletions.
92 changes: 2 additions & 90 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
import { StandardFooter, StandardHeader } from "blocks";
import { IconFacebook, IconInstagram, IconLinkedin, IconYoutube } from "icons";
import { AuthenticationProvider } from "providers";
import {
ButtonGroup,
Flex,
FlexItem,
IconButton,
Logo,
Section,
TextContentTitle,
TextLink,
TextLinkList,
TextListItem,
TextStrong,
} from "ui";
import { Flex, Section, TextContentTitle } from "ui";

function App() {
return (
Expand All @@ -24,82 +11,7 @@ function App() {
<TextContentTitle align="center" title="Title" subtitle="Subtitle" />
</Flex>
</Section>
<StandardFooter>
<Flex container type="quarter" wrap gap="xl">
<FlexItem size="minor">
<Flex direction="column" gap="lg">
<Logo />
<ButtonGroup>
<IconButton
aria-label="Write a nice description of the action."
onPress={() => {}}
size="sm"
variant="subtle"
>
<IconFacebook />
</IconButton>
<IconButton
aria-label="Write a nice description of the action."
onPress={() => {}}
size="sm"
variant="subtle"
>
<IconLinkedin />
</IconButton>
<IconButton
aria-label="Write a nice description of the action."
onPress={() => {}}
size="sm"
variant="subtle"
>
<IconYoutube />
</IconButton>
<IconButton
aria-label="Write a nice description of the action."
onPress={() => {}}
size="sm"
variant="subtle"
>
<IconInstagram />
</IconButton>
</ButtonGroup>
</Flex>
</FlexItem>
<TextLinkList title={<TextStrong>Text Strong</TextStrong>}>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
</TextLinkList>
<TextLinkList title={<TextStrong>Text Strong</TextStrong>}>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
</TextLinkList>
<TextLinkList title={<TextStrong>Text Strong</TextStrong>}>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item</TextLink>
</TextListItem>
</TextLinkList>
</Flex>
</StandardFooter>
<StandardFooter />
</AuthenticationProvider>
);
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/blocks/Cards/Cards.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Card, PricingCard, ProductInfoCard, TestimonialCard } from "./Cards";

const meta: Meta<typeof Card> = {
component: Card,
title: "blocks/Card",
title: "blocks/Cards",
parameters: { layout: "centered" },
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Cards/Cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
TextTitlePage,
} from "ui";
import { AnchorOrButton, AnchorOrButtonProps } from "ui/utils/AnchorOrButton";
import "./card.css";
import "./cards.css";

export type CardProps = ComponentPropsWithoutRef<"div"> & {
direction?: "horizontal" | "vertical";
Expand Down
10 changes: 0 additions & 10 deletions src/blocks/Cards/card.css → src/blocks/Cards/cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,10 @@

&.card-direction-vertical {
flex-direction: column;
/* grid-template-areas: "content";
&:has(.card-asset) {
grid-template-areas: "asset" "content";
} */
}

&.card-direction-horizontal {
flex-direction: var(--sds-responsive-direction-column-to-row);
/* grid-template-areas: "content";
&:has(.card-asset) {
grid-template-areas: "asset content";
grid-template-columns: auto 1fr;
} */
}

&.card-variant-stroke {
Expand Down
105 changes: 102 additions & 3 deletions src/blocks/Footers/Footers.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,113 @@
import { Section, type SectionProps } from "ui";
import { IconInstagram, IconLinkedin, IconTwitter, IconYoutube } from "icons";
import {
ButtonGroup,
Flex,
FlexItem,
IconButton,
Logo,
Section,
TextLink,
TextLinkList,
TextListItem,
TextStrong,
type SectionProps,
} from "ui";

export type StandardFooterProps = Omit<SectionProps, "variant" | "padding">;
export function StandardFooter({ className, ...props }: StandardFooterProps) {
return (
<Section
elementType="footer"
variant="brand"
variant="stroke"
paddingTop="md"
paddingBottom="lg"
style={{ marginTop: "auto" }}
{...props}
/>
>
<Flex wrap type="quarter" gap="xl" container>
<FlexItem size="minor">
<Flex direction="column" gap="xl" alignSecondary="start">
<FlexItem>
<Logo />
</FlexItem>
<SocialButtons />
</Flex>
</FlexItem>
<FlexItem size="minor">
<TextLinkList title={<TextStrong>Something 1</TextStrong>}>
<TextListItem>
<TextLink href="#">List item 1</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item 2</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item 3</TextLink>
</TextListItem>
</TextLinkList>
</FlexItem>
<FlexItem size="minor">
<TextLinkList title={<TextStrong>Something 2</TextStrong>}>
<TextListItem>
<TextLink href="#">List item 1</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item 2</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item 3</TextLink>
</TextListItem>
</TextLinkList>
</FlexItem>
<FlexItem size="minor">
<TextLinkList title={<TextStrong>Something 3</TextStrong>}>
<TextListItem>
<TextLink href="#">List item 1</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item 2</TextLink>
</TextListItem>
<TextListItem>
<TextLink href="#">List item 3</TextLink>
</TextListItem>
</TextLinkList>
</FlexItem>
</Flex>
</Section>
);
}

export function SocialButtons() {
return (
<ButtonGroup>
<IconButton
variant="subtle"
aria-label="Twitter"
href="https://www.twitter.com"
>
<IconTwitter />
</IconButton>
<IconButton
variant="subtle"
aria-label="Instagram"
href="https://www.instagram.com"
>
<IconInstagram />
</IconButton>
<IconButton
variant="subtle"
aria-label="YouTube"
href="https://www.youtube.com"
>
<IconYoutube />
</IconButton>
<IconButton
variant="subtle"
aria-label="LinkedIn"
href="https://www.linkedin.com"
>
<IconLinkedin />
</IconButton>
</ButtonGroup>
);
}
21 changes: 21 additions & 0 deletions src/blocks/Headers/Headers.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Meta, StoryObj } from "@storybook/react";
import { Flex, Section } from "ui";
import { StandardHeader } from "./Headers";

const meta: Meta<typeof StandardHeader> = {
component: StandardHeader,
title: "blocks/Headers",
parameters: { layout: "centered" },
};
export default meta;

export const Default: StoryObj<typeof StandardHeader> = {
render: () => (
<>
<StandardHeader />
<Section>
<Flex container>Something</Flex>
</Section>
</>
),
};
Loading

0 comments on commit a59b7fa

Please sign in to comment.