@rileybathurst/paddle 0.0.34 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +13 -4
- package/src/App.tsx +0 -1
- package/src/Button.tsx +15 -0
- package/src/PaddleBookNow.tsx +15 -0
- package/src/PaddleComposition.tsx +56 -0
- package/src/PaddleLocationCard.tsx +146 -0
- package/src/PaddleLocationDeck.tsx +21 -0
- package/src/PaddleSocials.tsx +44 -0
- package/src/PaddleTestimonials.tsx +24 -0
- package/src/PaddleTicket.tsx +53 -0
- package/src/PaddleTime.tsx +75 -0
- package/src/Test.tsx +3 -0
- package/src/assets/facebook-icon.tsx +26 -0
- package/src/assets/instagram-icon.tsx +27 -0
- package/src/assets/tripadvisor-icon.tsx +17 -0
- package/src/index.tsx +31 -1
- package/src/stories/BookNow.stories.tsx +19 -0
- package/src/stories/BookNow.tsx +29 -0
- package/src/stories/BrandList.stories.tsx +19 -0
- package/src/stories/BrandList.tsx +19 -0
- package/src/stories/Button.stories.tsx +19 -0
- package/src/stories/Button.tsx +15 -35
- package/src/stories/Card.stories.tsx +19 -0
- package/src/stories/Card.tsx +43 -0
- package/src/stories/Colors.mdx +71 -0
- package/src/stories/Composition.stories.tsx +19 -0
- package/src/stories/Composition.tsx +21 -0
- package/src/stories/Deal.tsx +31 -0
- package/src/stories/Deck.stories.tsx +19 -0
- package/src/stories/Deck.tsx +22 -0
- package/src/stories/Eyebrow.stories.tsx +19 -0
- package/src/stories/Eyebrow.tsx +21 -0
- package/src/stories/Footer.stories.tsx +19 -0
- package/src/stories/Footer.tsx +94 -0
- package/src/stories/Header.stories.ts +7 -7
- package/src/stories/Header.tsx +23 -51
- package/src/stories/Language.stories.tsx +19 -0
- package/src/stories/Language.tsx +22 -0
- package/src/stories/Links.stories.tsx +19 -0
- package/src/stories/Links.tsx +25 -0
- package/src/stories/Location.stories.tsx +19 -0
- package/src/stories/Location.tsx +55 -0
- package/src/stories/LocationDeck.stories.tsx +19 -0
- package/src/stories/LocationDeck.tsx +42 -0
- package/src/stories/Logo.stories.tsx +19 -0
- package/src/stories/Logo.tsx +60 -0
- package/src/stories/Page.stories.ts +6 -15
- package/src/stories/Page.tsx +116 -63
- package/src/stories/Pricing.stories.tsx +19 -0
- package/src/stories/Pricing.tsx +74 -0
- package/src/stories/Socials.stories.tsx +19 -0
- package/src/stories/Socials.tsx +50 -0
- package/src/stories/Spec.stories.tsx +19 -0
- package/src/stories/Spec.tsx +99 -0
- package/src/stories/Svg.stories.tsx +19 -0
- package/src/stories/Svg.tsx +23 -0
- package/src/stories/Testimonial.stories.tsx +19 -0
- package/src/stories/Testimonial.tsx +24 -0
- package/src/stories/Testimonials.stories.tsx +19 -0
- package/src/stories/Testimonials.tsx +42 -0
- package/src/stories/Ticket.stories.tsx +19 -0
- package/src/stories/Ticket.tsx +47 -0
- package/src/stories/TopBar.stories.tsx +19 -0
- package/src/stories/TopBar.tsx +19 -0
- package/src/stories/Typography.mdx +51 -0
- package/src/stories/Typography.stories.tsx +19 -0
- package/src/stories/Typography.tsx +39 -0
- package/src/stories/Widths.stories.tsx +19 -0
- package/src/stories/Widths.tsx +151 -0
- package/src/styles/a11y.css +10 -0
- package/src/styles/app.css +9 -1
- package/src/styles/body.css +0 -9
- package/src/styles/buttons.css +41 -0
- package/src/styles/color.css +21 -0
- package/src/styles/layout.css +156 -0
- package/src/styles/links.css +23 -0
- package/src/styles/lists.css +17 -0
- package/src/styles/media.css +139 -0
- package/src/styles/typography.css +229 -0
- package/src/styles/variables.css +140 -0
- package/src/testimonial-fragment.tsx +11 -0
- package/src/types/location-card-types.ts +24 -0
- package/src/types/ticket-types.ts +19 -0
- package/.eslintrc.cjs +0 -14
- package/.storybook/main.ts +0 -20
- package/.storybook/preview.ts +0 -16
- package/index.html +0 -13
- package/public/vite.svg +0 -1
- package/src/App.css +0 -42
- package/src/stories/Button.stories.ts +0 -52
- package/src/stories/button.css +0 -30
- package/src/test.tsx +0 -11
- package/tsconfig.json +0 -25
- package/tsconfig.node.json +0 -11
- package/vite.config.ts +0 -7
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
import FacebookIcon from '../assets/facebook-icon';
|
|
5
|
+
import InstagramIcon from '../assets/instagram-icon';
|
|
6
|
+
import TripadvisorIcon from '../assets/tripadvisor-icon';
|
|
7
|
+
|
|
8
|
+
interface SocialsProps {
|
|
9
|
+
primary?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Socials = ({
|
|
14
|
+
primary = false,
|
|
15
|
+
...props
|
|
16
|
+
}: SocialsProps) => {
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<main className="social">
|
|
20
|
+
{/* // TODO: boolean check on socials */}
|
|
21
|
+
{/* {useSiteMetadata().social?.facebook ?? */}
|
|
22
|
+
<a
|
|
23
|
+
href={faker.location.city()}
|
|
24
|
+
target='_blank' rel='noopener noreferrer'
|
|
25
|
+
aria-label={`${faker.location.city()} facebook`}
|
|
26
|
+
>
|
|
27
|
+
<FacebookIcon />
|
|
28
|
+
</a>
|
|
29
|
+
{/* } */}
|
|
30
|
+
{/* {useSiteMetadata().social?.instagram ?? */}
|
|
31
|
+
<a href={faker.location.city()}
|
|
32
|
+
target='_blank'
|
|
33
|
+
rel='noopener noreferrer'
|
|
34
|
+
aria-label={`${faker.location.city()} instagram`}
|
|
35
|
+
>
|
|
36
|
+
<InstagramIcon />
|
|
37
|
+
</a>
|
|
38
|
+
{/* } */}
|
|
39
|
+
{/* {useSiteMetadata().social?.instagram ?? */}
|
|
40
|
+
<a href={faker.location.city()}
|
|
41
|
+
target='_blank'
|
|
42
|
+
rel='noopener noreferrer'
|
|
43
|
+
aria-label={`${faker.location.city()} tripadvisor`}
|
|
44
|
+
>
|
|
45
|
+
<TripadvisorIcon />
|
|
46
|
+
</a>
|
|
47
|
+
{/* } */}
|
|
48
|
+
</main>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Spec } from './Spec';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Spec,
|
|
8
|
+
title: 'Molecules/Spec',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Spec>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
|
|
5
|
+
interface Spec3Types {
|
|
6
|
+
crew: string;
|
|
7
|
+
capacity: {
|
|
8
|
+
data: number;
|
|
9
|
+
unit: string;
|
|
10
|
+
};
|
|
11
|
+
test: {
|
|
12
|
+
data: string;
|
|
13
|
+
unit: string;
|
|
14
|
+
};
|
|
15
|
+
length: {
|
|
16
|
+
data: number;
|
|
17
|
+
unit: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function Spec3({ crew, capacity, test, length }: Spec3Types) {
|
|
21
|
+
|
|
22
|
+
console.log(crew);
|
|
23
|
+
console.log(capacity);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
Object.entries({ crew, capacity, test, length }).map(([key, value]) => {
|
|
27
|
+
|
|
28
|
+
// console.log(value);
|
|
29
|
+
// this is maybe where you can use generics to get around this check
|
|
30
|
+
|
|
31
|
+
// or if the next capacity data is a string
|
|
32
|
+
// so you create a string here from the object
|
|
33
|
+
|
|
34
|
+
if (typeof value !== 'string' && key && value) {
|
|
35
|
+
|
|
36
|
+
// console.log('🦖');
|
|
37
|
+
|
|
38
|
+
// * works but cant be type safe
|
|
39
|
+
// ? i guess you could wrap it in a typeof check
|
|
40
|
+
// so this is getting kinda ugly
|
|
41
|
+
if (key === 'length' && typeof value.data === 'number') {
|
|
42
|
+
return (
|
|
43
|
+
<section key={key}>
|
|
44
|
+
<h3>{key} - <Remainder inches={value.data} /></h3>
|
|
45
|
+
</section>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const combinedDataUnit = `${value.data} ${value.unit}`;
|
|
50
|
+
return (
|
|
51
|
+
<section key={key}>
|
|
52
|
+
<h3>{key} - {combinedDataUnit}</h3>
|
|
53
|
+
</section>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (key && value) {
|
|
58
|
+
|
|
59
|
+
// console.log('🦄');
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<section key={key}>
|
|
63
|
+
<h3>{key} - {value}</h3>
|
|
64
|
+
</section>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<section key={key}>
|
|
70
|
+
<h3>{key}</h3>
|
|
71
|
+
</section>
|
|
72
|
+
);
|
|
73
|
+
})
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
interface SpecProps {
|
|
80
|
+
primary?: boolean;
|
|
81
|
+
onClick?: () => void;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const Spec = ({
|
|
85
|
+
primary = false,
|
|
86
|
+
...props
|
|
87
|
+
}: SpecProps) => {
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<main
|
|
91
|
+
{...props}
|
|
92
|
+
>
|
|
93
|
+
<Spec3
|
|
94
|
+
crew={faker.helpers.arrayElement(['single', 'double'])}
|
|
95
|
+
capacity={{ data: faker.number.int(100), unit: "lbs" }}
|
|
96
|
+
/>
|
|
97
|
+
</main>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Svg } from './Svg';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Svg,
|
|
8
|
+
title: 'Atoms/Svg',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Svg>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import FacebookIcon from '../assets/facebook-icon';
|
|
5
|
+
|
|
6
|
+
interface SvgProps {
|
|
7
|
+
primary?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Svg = ({
|
|
12
|
+
primary = false,
|
|
13
|
+
...props
|
|
14
|
+
}: SvgProps) => {
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<main
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<FacebookIcon />
|
|
21
|
+
</main>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Testimonial } from './Testimonial';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Testimonial,
|
|
8
|
+
title: 'Molecules/Testimonial',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Testimonial>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
|
|
5
|
+
interface TestimonialProps {
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Testimonial = ({
|
|
11
|
+
primary = false,
|
|
12
|
+
...props
|
|
13
|
+
}: TestimonialProps) => {
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<li
|
|
17
|
+
key={faker.string.alphanumeric()}
|
|
18
|
+
>
|
|
19
|
+
<p className='elbrus'><span className='denali font-serif'>“</span>{faker.lorem.sentence()}<span className='denali font-serif'>”</span></p>
|
|
20
|
+
<p>{faker.helpers.arrayElement(['Thank You,', 'Sincerely,', null])} {faker.person.firstName()}</p>
|
|
21
|
+
<p className='kosciuszko'>{faker.location.city()}</p>
|
|
22
|
+
</li>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Testimonials } from './Testimonials';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Testimonials,
|
|
8
|
+
title: 'Organisms/Testimonials',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Testimonials>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
import { Testimonial } from './Testimonial';
|
|
5
|
+
|
|
6
|
+
function Deal() {
|
|
7
|
+
|
|
8
|
+
const hand = faker.number.int(10);
|
|
9
|
+
console.log(hand);
|
|
10
|
+
|
|
11
|
+
if (hand < 1) {
|
|
12
|
+
return (
|
|
13
|
+
<h1>There are no cards available</h1>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const content = [];
|
|
18
|
+
for (let i = 0; i < hand; i++) {
|
|
19
|
+
content.push(
|
|
20
|
+
<Testimonial />
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (<>{content}</>);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface TestimonialsProps {
|
|
28
|
+
primary?: boolean;
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const Testimonials = ({
|
|
33
|
+
primary = false,
|
|
34
|
+
...props
|
|
35
|
+
}: TestimonialsProps) => {
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<ul className='testimonials condor'>
|
|
39
|
+
<Deal />
|
|
40
|
+
</ul>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Ticket } from './Ticket';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Ticket,
|
|
8
|
+
title: 'Molecules/Ticket',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Ticket>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// TODO: when I have an internet connection
|
|
2
|
+
// this is the Name.tsx file
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Link } from 'react-aria-components';
|
|
5
|
+
import { faker } from '@faker-js/faker';
|
|
6
|
+
import { PaddleTime } from '../PaddleTime';
|
|
7
|
+
|
|
8
|
+
export const Ticket = () => {
|
|
9
|
+
|
|
10
|
+
const time = PaddleTime({
|
|
11
|
+
timeframe: faker.datatype.boolean() ? faker.helpers.arrayElement(['sunset', 'overnight']) : null,
|
|
12
|
+
// ? faker boolean covering both start and finish
|
|
13
|
+
start: faker.datatype.boolean() ? `${faker.number.int({ min: 1, max: 24 })}:${faker.number.int(60)}:00.000` : null,
|
|
14
|
+
finish: faker.datatype.boolean() ? `${faker.number.int({ min: 1, max: 24 })}:${faker.number.int(60)}:00.000` : null,
|
|
15
|
+
duration: faker.datatype.boolean() ? faker.number.int(200) : null
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<section className="ticket">
|
|
20
|
+
<Link href={`/tours/${faker.location.city()}`}>
|
|
21
|
+
<img src={faker.image.url()} alt={faker.lorem.words(2)} />
|
|
22
|
+
</Link>
|
|
23
|
+
<h4 className="card__title">
|
|
24
|
+
<Link href={`/tours/${faker.location.city()}`}>
|
|
25
|
+
{faker.location.city()}
|
|
26
|
+
</Link>
|
|
27
|
+
</h4>
|
|
28
|
+
<div className="card__specs">
|
|
29
|
+
<h4>{time.entry}</h4>
|
|
30
|
+
{faker.datatype.boolean() ? <h4 className="capitalize">{faker.helpers.arrayElement(['easy', 'medium', 'hard'])} <span>Fitness</span></h4> : null}
|
|
31
|
+
</div>
|
|
32
|
+
<hr />
|
|
33
|
+
<p>{faker.lorem.sentences(2)}</p>
|
|
34
|
+
<hr />
|
|
35
|
+
<div className="card__details">
|
|
36
|
+
<h5>{faker.datatype.boolean() ? `$${faker.number.int(200)}` : null}</h5>
|
|
37
|
+
<a
|
|
38
|
+
href={faker.location.city()}
|
|
39
|
+
className="book-now"
|
|
40
|
+
>
|
|
41
|
+
BOOK NOW
|
|
42
|
+
</a>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
</section>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { TopBar } from './TopBar';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: TopBar,
|
|
8
|
+
title: 'Atoms/TopBar',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof TopBar>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface TopBarProps {
|
|
5
|
+
primary?: boolean;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const TopBar = ({
|
|
10
|
+
primary = false,
|
|
11
|
+
...props
|
|
12
|
+
}: TopBarProps) => {
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="top-bar" >
|
|
16
|
+
<p>We're Open for the 2024 Summer</p>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Setting in px is dumb and not getting the name
|
|
2
|
+
|
|
3
|
+
import { Meta, Typeset } from "@storybook/blocks";
|
|
4
|
+
|
|
5
|
+
<Meta title="Typography" />
|
|
6
|
+
|
|
7
|
+
export const typography = {
|
|
8
|
+
type: {
|
|
9
|
+
primary: '"Barlow", Arial, sans-serif',
|
|
10
|
+
},
|
|
11
|
+
weight: {
|
|
12
|
+
regular: "400",
|
|
13
|
+
bold: "700",
|
|
14
|
+
extrabold: "800",
|
|
15
|
+
black: "900",
|
|
16
|
+
},
|
|
17
|
+
// Font sizes in pixels
|
|
18
|
+
size: {
|
|
19
|
+
everest: 3 * 16,
|
|
20
|
+
aconcagua: 2.5 * 16,
|
|
21
|
+
denali: 2 * 16,
|
|
22
|
+
kilimanjaro: 1.5 * 16,
|
|
23
|
+
elbrus: 1.25 * 16,
|
|
24
|
+
vinson: 16,
|
|
25
|
+
kosciuszko: 0.75 * 16,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const SampleText =
|
|
30
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
|
|
31
|
+
|
|
32
|
+
# Typography
|
|
33
|
+
|
|
34
|
+
**Font:** Nunito Sans
|
|
35
|
+
|
|
36
|
+
**Weights:** 400(regular), 700(bold), 800(extrabold), 900(black)
|
|
37
|
+
|
|
38
|
+
<Typeset
|
|
39
|
+
fontSizes={[
|
|
40
|
+
Number(typography.size.kosciuszko),
|
|
41
|
+
Number(typography.size.vinson),
|
|
42
|
+
Number(typography.size.elbrus),
|
|
43
|
+
Number(typography.size.kilimanjaro),
|
|
44
|
+
Number(typography.size.denali),
|
|
45
|
+
Number(typography.size.aconcagua),
|
|
46
|
+
Number(typography.size.everest),
|
|
47
|
+
]}
|
|
48
|
+
fontWeight={typography.weight.black}
|
|
49
|
+
sampleText={SampleText}
|
|
50
|
+
fontFamily={typography.type.primary}
|
|
51
|
+
/>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Typography } from './Typography';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Typography,
|
|
8
|
+
title: 'Atoms/Typography',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Typography>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Eyebrow } from './Eyebrow';
|
|
4
|
+
|
|
5
|
+
interface TypographyProps {
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Typography = ({
|
|
11
|
+
primary = false,
|
|
12
|
+
...props
|
|
13
|
+
}: TypographyProps) => {
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<>
|
|
17
|
+
<h1>everest</h1>
|
|
18
|
+
<h2>aconcagua</h2>
|
|
19
|
+
<h3>denali</h3>
|
|
20
|
+
<h4>kilimanjaro</h4>
|
|
21
|
+
<h5>elbrus</h5>
|
|
22
|
+
<h6>vinson</h6>
|
|
23
|
+
<p>kosciuszko</p>
|
|
24
|
+
|
|
25
|
+
<hr />
|
|
26
|
+
|
|
27
|
+
{/* // TODO: fix this naming */}
|
|
28
|
+
<p className="typography__secondary">typography__secondary</p>
|
|
29
|
+
|
|
30
|
+
<hr />
|
|
31
|
+
|
|
32
|
+
<Eyebrow />
|
|
33
|
+
<p>
|
|
34
|
+
These can be any version of h to be a well styled html doc as long as
|
|
35
|
+
they have the hgroup wrapper with a class of crest
|
|
36
|
+
</p>
|
|
37
|
+
</ >
|
|
38
|
+
);
|
|
39
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Widths } from './Widths';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Widths,
|
|
8
|
+
title: 'Atoms/Widths',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Widths>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|