Skip to content

Commit

Permalink
Implement new about page design
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Jul 7, 2023
1 parent 1f782f3 commit 4db8542
Show file tree
Hide file tree
Showing 9 changed files with 287 additions and 132 deletions.
1 change: 1 addition & 0 deletions code/ui/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const config: StorybookConfig = {
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-storysource',
'@storybook/addon-designs',
],
framework: {
name: '@storybook/react-vite',
Expand Down
27 changes: 27 additions & 0 deletions code/ui/components/src/clipboard/ClipboardCode.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { color, styled, typography } from '@storybook/theming';

const Code = styled.pre`
line-height: 18px;
padding: 11px 1rem;
white-space: pre-wrap;
background: rgba(0, 0, 0, 0.05);
color: ${color.darkest};
border-radius: 3px;
margin: 1rem 0;
width: 100%;
display: block;
overflow: hidden;
font-family: ${typography.fonts.mono};
font-size: ${typography.size.s2 - 1}px;
`;

interface ClipboardCodeProps {
code: string;
}

export const ClipboardCode = ({ code, ...props }: ClipboardCodeProps) => (
<Code id="clipboard-code" {...props}>
{code}
</Code>
);
3 changes: 2 additions & 1 deletion code/ui/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export { Span } from './typography/elements/Span';
export { Table } from './typography/elements/Table';
export { TT } from './typography/elements/TT';
export { UL } from './typography/elements/UL';

export { Badge } from './Badge/Badge';

// Typography
Expand Down Expand Up @@ -85,6 +84,8 @@ export * from './typography/ResetWrapper';

export { withReset, codeCommon } from './typography/lib/common';

export { ClipboardCode } from './clipboard/ClipboardCode';

// eslint-disable-next-line prefer-destructuring
export const components = typography.components;

Expand Down
1 change: 1 addition & 0 deletions code/ui/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"devDependencies": {
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@storybook/addon-designs": "^7.0.0",
"@storybook/addons": "7.1.0-beta.1",
"@storybook/api": "7.1.0-beta.1",
"@storybook/channel-postmessage": "7.1.0-beta.1",
Expand Down
44 changes: 0 additions & 44 deletions code/ui/manager/src/settings/about.stories.jsx

This file was deleted.

39 changes: 39 additions & 0 deletions code/ui/manager/src/settings/about.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';
import { AboutScreen } from './about';

const meta = {
component: AboutScreen,
title: 'Settings/AboutScreen',
decorators: [
(Story) => (
<div
style={{
position: 'relative',
height: '100vh',
width: '100vw',
}}
>
<Story />
</div>
),
],
} satisfies Meta<typeof AboutScreen>;

export default meta;

type Story = StoryObj<typeof meta>;

export const Default: Story = {
args: {
current: {
version: '7.0.1',
},
},
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/ur4kydUbRqdDyfoZWzdiIw/Storybook-app?type=design&node-id=9564-120444&mode=design&t=0TPINZFpwgFQFQeX-4',
},
},
};
Loading

0 comments on commit 4db8542

Please sign in to comment.