diff --git a/src/components/Icons/Icons.stories.tsx b/src/components/Icons/Icons.stories.tsx deleted file mode 100644 index d24991b..0000000 --- a/src/components/Icons/Icons.stories.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import React from 'react'; -import type { Meta, StoryObj } from '@storybook/react'; -import { ArrowIcon } from './ArrowIcon'; -import { ClockIcon } from './ClockIcon'; -import { DiscordIcon } from './DiscordIcon'; -import { ExpandIcon } from './ExpandIcon'; -import { ExternalIcon } from './ExternalIcon'; -import { FemaleIcon } from './FemaleIcon'; -import { LocationIcon } from './LocationIcon'; -import { MaleIcon } from './MaleIcon'; -import { ReceiptIcon } from './ReceiptIcon'; -import { WalletIcon } from './WalletIcon'; - -const meta = { - title: 'Components/Icons', - parameters: { - layout: 'centered', - }, - tags: ['autodocs'], -} satisfies Meta; - -export default meta; - -type Story = StoryObj; - -export const Arrow: Story = { - render: () => , -}; - -export const Clock: Story = { - render: () => , -}; - -export const Discord: Story = { - render: () => , -}; - -export const Expand: Story = { - render: () => , -}; - -export const External: Story = { - render: () => , -}; - -export const Female: Story = { - render: () => , -}; - -export const Location: Story = { - render: () => , -}; - -export const Male: Story = { - render: () => , -}; - -export const Receipt: Story = { - render: () => , -}; - -export const Wallet: Story = { - render: () => , -}; diff --git a/src/stories/Icons.mdx b/src/stories/Icons.mdx new file mode 100644 index 0000000..365e277 --- /dev/null +++ b/src/stories/Icons.mdx @@ -0,0 +1,68 @@ +import { Meta, Title, IconGallery, IconItem } from '@storybook/blocks'; + +import { ArrowIcon } from '@/components/Icons/ArrowIcon'; +import { DiscordIcon } from '@/components/Icons/DiscordIcon'; +import { ExpandIcon } from '@/components/Icons/ExpandIcon'; +import { ExternalIcon } from '@/components/Icons/ExternalIcon'; +import { FemaleIcon } from '@/components/Icons/FemaleIcon'; +import { LocationIcon } from '@/components/Icons/LocationIcon'; +import { MaleIcon } from '@/components/Icons/MaleIcon'; +import { ReceiptIcon } from '@/components/Icons/ReceiptIcon'; +import { WalletIcon } from '@/components/Icons/WalletIcon'; + + + +# Icons + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Usage + +Import these icons from the `@/components/Icons` directory. + +```jsx +import { ArrowIcon } from '@/components/Icons/ArrowIcon'; + +function MyComponent() { + return ( +
+ + {/* Other component content */} +
+ ); +} +``` + +Each icon can be customized with props including `className` and `fill` for setting the styles of the icon. + +```jsx + +``` diff --git a/src/stories/Introduction.mdx b/src/stories/Introduction.mdx index 9449909..46f675d 100644 --- a/src/stories/Introduction.mdx +++ b/src/stories/Introduction.mdx @@ -1,11 +1,11 @@ import { Meta } from '@storybook/blocks'; - + -# Bristol Social Groups Design System +# Bristol Social Groups Storybook -This pattern library contains components used to build Bristol Social Groups. Navigate through components using the sidebar to the left. More components will be added as time goes on. +This website documents the resources and components used to create **[bristolsocialgroups.com](https://bristolsocialgroups.com/)**. -View the live site at [bristolsocialgroups.com](https://bristolsocialgroups.com/) +Learn more about the color scheme, typography setup and iconography in the style guide section, or navigate through the components folder to see the individual components in action. -Check out the source code [on GitHub](https://github.com/jhancock532/bristol-social-groups). +The source code for Bristol Social Groups and this Storybook instance is available [on GitHub](https://github.com/jhancock532/bristol-social-groups). diff --git a/src/stories/Typography.mdx b/src/stories/Typography.mdx new file mode 100644 index 0000000..26aaf0a --- /dev/null +++ b/src/stories/Typography.mdx @@ -0,0 +1,106 @@ +import { Meta, Typeset } from '@storybook/blocks'; + + + +# Typography + +The only font used by the site is **Rubik**, which is available on [Google Fonts](https://fonts.google.com/specimen/Rubik). It is a variable sans-serif font which does not support italics. This font was chosen for this project as it conveys a formal friendliness. + +## Font sizes + +The typography for this project scales dynamically between set values depending on the size of the viewport. This has been calculated using [utopia.fyi](https://utopia.fyi/type/calculator/?c=320,16,1.333,1240,20,1.333,5,1,&s=0.75%7C0.5%7C0.25,1.5%7C2%7C3%7C4%7C6,s-l&g=s,l,xl,12). + +The following font sizes are measured in pixels, and represent the minimum mobile size and the maximum desktop size for each type setting, which the font will scale smoothly between. + +### Extra Small + + + +### Small + + + +### Small Medium + + + +### Medium + + + +### Large + + + +### X Large + + + +### Largest + + + +## Usage + +Please use the following mixin to apply font sizes to your elements in SCSS: + +```scss +@use 'variables' as *; + +@include font-size(s); +``` + +Where the following values are available, corresponding to the above typeset demonstrations: + +- `xs` +- `s` +- `sm` +- `m` +- `l` +- `xl` +- `xxl` + +You can override a mobile font size with different font size on desktop, a H1 heading has the following SCSS for example: + +```scss +@include font-size(xl); + +@include media-query(large) { + @include font-size(xxl); +} +``` diff --git a/src/styles/globals.scss b/src/styles/globals.scss index eb60cb4..0c8a15d 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -123,7 +123,7 @@ html, // Default sizes h1 { - @include font-size(xxxl); + @include font-size(xxl); font-weight: $weight-bold; margin: 0 0 math.div($grid, 2);