Skip to content

Commit 175a516

Browse files
committed
feat: refresh
1 parent dcc516a commit 175a516

96 files changed

Lines changed: 1049 additions & 1301 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/ui/.storybook/config.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,25 @@
77
import React, { StrictMode } from 'react';
88
import { configure, addDecorator } from '@storybook/react';
99

10-
import { ThemeProvider } from '../src/styles';
11-
import { ThemeProvider as TreatThemeProvider } from '../src/styles/treat';
12-
import { Baseline } from '../src/Baseline';
13-
import { Text } from '../src/Text';
10+
import { Small } from '../src/Typography';
1411
import { Button } from '../src/Button';
1512

13+
// theme
14+
import { ThemeProvider, createTheme } from '../src/styles/theme';
15+
import { themeRef } from './theme.treat';
16+
import { TreatProvider } from 'react-treat';
17+
import '../src/styles/baseline.treat';
18+
1619
const req = require.context('../__stories__', true, /\.stories\.tsx$/);
1720

1821
function loadStories() {
1922
req.keys().forEach(req);
2023
}
2124

22-
import { theme } from './theme';
23-
import { themeRef } from './theme.treat';
24-
2525
addDecorator((story) => (
2626
<StrictMode>
27-
<ThemeProvider theme={theme}>
28-
<TreatThemeProvider themeRef={themeRef} theme={theme}>
29-
<Baseline />
27+
<ThemeProvider theme={createTheme()}>
28+
<TreatProvider theme={themeRef}>
3029
<div
3130
style={{
3231
position: 'relative',
@@ -39,10 +38,9 @@ addDecorator((story) => (
3938
>
4039
<div style={{ flex: 1 }}>{story()}</div>
4140
<div style={{ opacity: 0.4, margin: '2em 0 1em 0' }}>
42-
<Text size="tiny">
41+
<Small>
4342
Design by:&nbsp;
4443
<Button
45-
size="tiny"
4644
variant="link"
4745
component={({ children, ...rest }) => (
4846
<a {...rest} href="http://saismo.at/" target="_blank">
@@ -52,10 +50,10 @@ addDecorator((story) => (
5250
>
5351
saismo
5452
</Button>
55-
</Text>
53+
</Small>
5654
</div>
5755
</div>
58-
</TreatThemeProvider>
56+
</TreatProvider>
5957
</ThemeProvider>
6058
</StrictMode>
6159
));
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { theme } from './theme';
2-
import { createTheme as createThemeRef } from '../src/styles/treat';
3-
1+
import { createTheme } from '../src/styles/theme';
2+
const theme = createTheme();
3+
import { createTheme as createThemeRef } from 'treat';
44
export const themeRef = createThemeRef(theme);

packages/ui/.storybook/theme.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/ui/.storybook/tsconfig.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/ui/.storybook/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module.exports = ({ config }) => {
2121

2222
config.plugins = [
2323
new TreatPlugin({
24-
verbose: true,
2524
outputLoaders: [MiniCssExtractPlugin.loader],
2625
}),
2726
new MiniCssExtractPlugin(),

packages/ui/__stories__/Autocomplete.treat.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ globalStyle(`${lightMenuItem}${selected}`, ({ palette }) => ({
3939
// input
4040
export const inlineAutocompleteInput = style(() => ({}));
4141

42-
globalStyle(`${inlineAutocompleteInput} ${input}`, ({ palette, spacing, typography }) => ({
43-
padding: spacing('tiny'),
42+
globalStyle(`${inlineAutocompleteInput} ${input}`, ({ palette, sizing, typography }) => ({
43+
padding: sizing('tiny'),
4444
color: palette.white,
45-
fontWeight: typography.weights.semiBold,
45+
fontWeight: typography.weights.bold,
4646
backgroundColor: palette.lighten('gray100', 0.2),
4747
}));
4848

49-
globalStyle(`${inlineAutocompleteInput} ${endSvg}`, ({ spacing }) => ({
50-
bottom: `${spacing('tiny') + 1}px !important`,
51-
right: `${spacing('tiny')}px !important`,
49+
globalStyle(`${inlineAutocompleteInput} ${endSvg}`, ({ sizing }) => ({
50+
bottom: `${sizing('tiny') + 1}px !important`,
51+
right: `${sizing('tiny')}px !important`,
5252
}));

packages/ui/__stories__/Avatar.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ stories.add('No bank connections', () => (
3737
</Avatar>
3838
</Flex>
3939
<Flex item style={{ textAlign: 'center' }}>
40-
<Text size="large" weight="semiBold" color="accent" gutterBottom>
40+
<Text size="large" weight="bold" color="accent" gutterBottom>
4141
You haven’t connected any accounts yet.
4242
</Text>
4343
<Text size="medium" color="secondary">

0 commit comments

Comments
 (0)