Skip to content

Commit 7906d92

Browse files
authored
feat: add Footer component (#36)
1 parent 3141198 commit 7906d92

File tree

9 files changed

+1306
-828
lines changed

9 files changed

+1306
-828
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
"@fuels/prettier-config": "^0.0.9",
5555
"@fuels/ts-config": "^0.0.9",
5656
"@fuels/tsup-config": "^0.0.9",
57-
"jest": "29.6.4",
57+
"jest": "29.7.0",
5858
"lint-staged": "14.0.1"
5959
},
6060
"devDependencies": {
61-
"@swc/core": "1.3.83",
61+
"@swc/core": "1.3.84",
6262
"@swc/jest": "0.2.29",
6363
"@types/jest": "29.5.4",
64-
"eslint": "^8.48.0",
64+
"eslint": "^8.49.0",
6565
"husky": "^8.0.3",
6666
"npm-run-all": "^4.1.5",
6767
"prettier": "^3.0.3",

packages/app/package.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,33 @@
2828
},
2929
"devDependencies": {
3030
"@babel/core": "^7.22.17",
31-
"@storybook/addon-a11y": "^7.4.0",
32-
"@storybook/addon-actions": "^7.4.0",
33-
"@storybook/addon-essentials": "^7.4.0",
34-
"@storybook/addon-interactions": "^7.4.0",
35-
"@storybook/addon-links": "^7.4.0",
36-
"@storybook/addon-storysource": "^7.4.0",
37-
"@storybook/addon-viewport": "7.4.0",
38-
"@storybook/addons": "^7.4.0",
39-
"@storybook/api": "^7.4.0",
40-
"@storybook/components": "^7.4.0",
41-
"@storybook/core-events": "^7.4.0",
42-
"@storybook/nextjs": "7.4.0",
43-
"@storybook/react": "^7.4.0",
31+
"@storybook/addon-a11y": "^7.4.1",
32+
"@storybook/addon-actions": "^7.4.1",
33+
"@storybook/addon-essentials": "^7.4.1",
34+
"@storybook/addon-interactions": "^7.4.1",
35+
"@storybook/addon-links": "^7.4.1",
36+
"@storybook/addon-storysource": "^7.4.1",
37+
"@storybook/addon-viewport": "7.4.1",
38+
"@storybook/addons": "^7.4.1",
39+
"@storybook/api": "^7.4.1",
40+
"@storybook/components": "^7.4.1",
41+
"@storybook/core-events": "^7.4.1",
42+
"@storybook/nextjs": "7.4.1",
43+
"@storybook/react": "^7.4.1",
4444
"@storybook/testing-library": "^0.2.0",
45-
"@storybook/theming": "^7.4.0",
46-
"@storybook/types": "^7.4.0",
45+
"@storybook/theming": "^7.4.1",
46+
"@storybook/types": "^7.4.1",
4747
"@testing-library/dom": "9.3.1",
4848
"@testing-library/jest-dom": "6.1.3",
49-
"@types/node": "20.5.9",
49+
"@types/node": "20.6.0",
5050
"@types/react": "^18.2.21",
5151
"@types/react-dom": "^18.2.7",
5252
"@xstate/cli": "^0.5.2",
53-
"storybook": "^7.4.0",
53+
"storybook": "^7.4.1",
5454
"storybook-dark-mode": "^3.0.1",
5555
"tsconfig-paths-webpack-plugin": "^4.1.0",
5656
"typescript": "5.2.2",
5757
"vite": "^4.4.9",
58-
"vite-tsconfig-paths": "^4.2.0"
58+
"vite-tsconfig-paths": "^4.2.1"
5959
}
6060
}
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import type { Meta, StoryObj } from '@storybook/react';
2+
3+
import { Footer } from './Footer';
4+
5+
const meta: Meta<typeof Footer> = {
6+
title: 'Core/Footer',
7+
component: Footer,
8+
parameters: {
9+
layout: 'fullscreen',
10+
},
11+
};
12+
13+
export default meta;
14+
type Story = StoryObj<typeof Footer>;
15+
16+
export const Desktop: Story = {
17+
args: {},
18+
};
19+
20+
export const Tablet: Story = {
21+
args: {},
22+
parameters: {
23+
viewport: {
24+
defaultViewport: 'ipad',
25+
},
26+
},
27+
};
28+
29+
export const Mobile: Story = {
30+
args: {},
31+
parameters: {
32+
viewport: {
33+
defaultViewport: 'iphonex',
34+
},
35+
},
36+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
import { cssObj } from '@fuel-ui/css';
2+
import {
3+
Box,
4+
FuelLogo,
5+
Heading,
6+
IconButton,
7+
Link,
8+
List,
9+
Text,
10+
} from '@fuel-ui/react';
11+
import Image from 'next/image';
12+
13+
type FooterNavProps = {
14+
title: string;
15+
img: string;
16+
alt: string;
17+
links: {
18+
href: string;
19+
label: string;
20+
}[];
21+
};
22+
23+
function FooterNav({ title, links, img, alt }: FooterNavProps) {
24+
return (
25+
<Box.VStack as="nav" css={styles.nav}>
26+
<Image src={img} alt={alt} width={40} height={40} />
27+
<Heading as="h4">{title}</Heading>
28+
<List>
29+
{links.map((link) => (
30+
<List.Item key={link.href}>
31+
<Link href={link.href} isExternal>
32+
{link.label}
33+
</Link>
34+
</List.Item>
35+
))}
36+
</List>
37+
</Box.VStack>
38+
);
39+
}
40+
41+
export function Footer() {
42+
return (
43+
<Box as="footer" css={styles.root}>
44+
<Box.VStack css={styles.brand} gap="$6" justify="center">
45+
<Box.HStack align="center">
46+
<FuelLogo size={24} />
47+
<Heading as="h2">FUEL</Heading>
48+
</Box.HStack>
49+
<Text>© All rights reserved Fuel Labs</Text>
50+
<Box.HStack gap="$6">
51+
<IconButton
52+
size="md"
53+
variant="link"
54+
as="a"
55+
href="https://twitter.com/fuel_network"
56+
target="_blank"
57+
rel="noopener noreferrer"
58+
aria-label="Twitter"
59+
icon="BrandTwitter"
60+
iconSize={30}
61+
/>
62+
<IconButton
63+
variant="link"
64+
as="a"
65+
href="https://github.com/FuelLabs"
66+
target="_blank"
67+
rel="noopener noreferrer"
68+
aria-label="Github"
69+
icon="BrandGithub"
70+
iconSize={30}
71+
/>
72+
<IconButton
73+
variant="link"
74+
as="a"
75+
href="https://discord.com/invite/xfpK4Pe"
76+
target="_blank"
77+
rel="noopener noreferrer"
78+
aria-label="Discord"
79+
icon="BrandDiscord"
80+
iconSize={30}
81+
/>
82+
</Box.HStack>
83+
</Box.VStack>
84+
85+
<Box css={styles.navs}>
86+
<FooterNav
87+
title="Resources"
88+
img="/icons/fuel_icon_brandbook.svg"
89+
alt="Brandbook Icon"
90+
links={[
91+
{
92+
href: 'https://fuellabs.notion.site/27f2a32606044179bab5e2ac8e85ab0e?v=c4dfd88031f14e5da0f1845e6de8b623&pvs=4',
93+
label: 'AMAs',
94+
},
95+
{
96+
href: 'https://fuel-brand-guide.webflow.io/',
97+
label: 'Brand Guide',
98+
},
99+
{
100+
href: 'https://fuellabs.notion.site/Podcasts-9f829504cafd4ae5bc7e81d682070965?pvs=4',
101+
label: 'Podcasts',
102+
},
103+
{
104+
href: 'https://fuellabs.notion.site/Articles-25490e91c34743e7bb0c53f0d45917b8?pvs=4',
105+
label: 'Articles',
106+
},
107+
{
108+
href: 'https://fuellabs.notion.site/Workshops-Presentations-b0fb9a20de4c448cac2823be3448f149?pvs=4',
109+
label: 'Presentations',
110+
},
111+
{
112+
href: 'https://fuellabs.notion.site/People-to-follow-bff175ae0a1b4eecb837b40a6e96a547?pvs=4',
113+
label: 'Accounts to follow',
114+
},
115+
{
116+
href: 'https://fuellabs.notion.site/Tweets-82449686e63e424fb8ec9a9d4a91f147?pvs=4',
117+
label: 'Best Tweets',
118+
},
119+
]}
120+
/>
121+
<FooterNav
122+
title="About us"
123+
img="/icons/fuel_icon_about.svg"
124+
alt="About Icon"
125+
links={[
126+
{
127+
href: 'https://github.com/FuelLabs/awesome-fuel#upcoming-events-and-hackathons',
128+
label: 'Events',
129+
},
130+
{
131+
href: 'https://forum.fuel.network/',
132+
label: 'Forum',
133+
},
134+
{
135+
href: 'https://jobs.lever.co/fuellabs',
136+
label: 'Jobs',
137+
},
138+
{
139+
href: 'https://fuel-labs.ghost.io/fuel-q4-grant-program/',
140+
label: 'Apply for a Grant',
141+
},
142+
]}
143+
/>
144+
<FooterNav
145+
title="Developers"
146+
img="/icons/fuel_icon_code.svg"
147+
alt="Code Icon"
148+
links={[
149+
{
150+
href: 'https://docs.fuel.network/',
151+
label: 'Documentation',
152+
},
153+
{
154+
href: 'https://fuellabs.github.io/sway/master/reference/contributing_to_sway.html',
155+
label: 'Contributors Guide',
156+
},
157+
{
158+
href: 'https://fuellabs.github.io/sway',
159+
label: 'Learn Sway',
160+
},
161+
{
162+
href: 'https://github.com/FuelLabs/sway-applications',
163+
label: 'Example Apps',
164+
},
165+
{
166+
href: 'https://github.com/FuelLabs/fuel-specs',
167+
label: 'Fuel Specs',
168+
},
169+
{
170+
href: 'https://fuellabs.github.io/fuel-indexer/master/',
171+
label: 'Fuel Indexer',
172+
},
173+
{
174+
href: 'https://www.fuel.network/about-us/fuel-v1',
175+
label: 'Fuel V1',
176+
},
177+
]}
178+
/>
179+
</Box>
180+
</Box>
181+
);
182+
}
183+
184+
const styles = {
185+
root: cssObj({
186+
py: '$8',
187+
px: '$8',
188+
background: 'url(/logo-faded.svg) no-repeat -40px center',
189+
backgroundSize: 'auto 100%',
190+
display: 'grid',
191+
gridTemplateColumns: '1fr',
192+
gridTemplateRows: 'auto 1fr',
193+
gridGap: '$10',
194+
195+
'@lg': {
196+
gridTemplateColumns: '1fr 2fr',
197+
gridTemplateRows: 'auto',
198+
py: '$14',
199+
px: '$16',
200+
},
201+
}),
202+
brand: cssObj({
203+
alignItems: 'center',
204+
pb: '$10',
205+
borderBottom: '1px solid $border',
206+
207+
'@lg': {
208+
pb: '$0',
209+
alignItems: 'flex-start',
210+
borderBottom: 'none',
211+
},
212+
213+
'.fuel_Heading': {
214+
margin: 0,
215+
},
216+
217+
'.fuel_IconButton .fuel_Icon': {
218+
transition: 'color 0.2s ease-in-out',
219+
},
220+
221+
'.fuel_IconButton:hover .fuel_Icon': {
222+
color: '$brand !important',
223+
},
224+
}),
225+
navs: cssObj({
226+
display: 'flex',
227+
flexDirection: 'column',
228+
gap: '$10',
229+
justifyContent: 'space-between',
230+
231+
'@md': {
232+
flexDirection: 'row',
233+
textAlign: 'center',
234+
},
235+
}),
236+
nav: cssObj({
237+
flex: 1,
238+
239+
'@md': {
240+
alignItems: 'center',
241+
},
242+
243+
'@lg': {
244+
textAlign: 'left',
245+
alignItems: 'flex-start',
246+
},
247+
248+
'.fuel_Heading': {
249+
mb: '$0',
250+
},
251+
252+
'.fuel_List': {
253+
display: 'flex',
254+
flexDirection: 'column',
255+
gap: '$1',
256+
},
257+
'.fuel_Link': {
258+
color: '$textColor',
259+
},
260+
'.fuel_Link .fuel_Icon': {
261+
display: 'none',
262+
},
263+
}),
264+
};

packages/graphql/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"@graphql-tools/utils": "^10.0.6",
27-
"@types/node": "^20.5.9",
27+
"@types/node": "^20.6.0",
2828
"@types/cors": "^2.8.14",
2929
"@types/express": "^4.17.17",
3030
"@fuels/ts-config": "^0.0.9",

0 commit comments

Comments
 (0)