Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Cleanup fonts #206

Merged
merged 6 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import { addParameters } from '@storybook/react';
import { ThemeProvider } from 'styled-components';

import theme from '../src/theme';
import GlobalStyles from '../src/global';

addDecorator((storyFn) => (
<>
<GlobalStyles />
<ThemeProvider theme={theme}>{storyFn()}</ThemeProvider>
</>
));
Expand Down
12 changes: 0 additions & 12 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@ module.exports = ({ config }) => {
return rule
})

config.module.rules.push({
test: /\.(woff|woff2|eot|ttf)$/,
use: [
{
loader: 'file-loader',
query: {
name: '[name].[ext]'
}
}
]
});

config.module.rules.push({
test: /\.(svg|png|jpg)$/i,
use: [
Expand Down
40 changes: 0 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,46 +44,6 @@ export default () => (
);
```

### Using the same fonts as Gnosis Safe

If you want your Safe App to have the same fonts as the one used by Gnosis Safe you need to do the following.

```js
import { createGlobalStyle } from 'styled-components';
import avertaFont from '@gnosis.pm/safe-react-components/dist/fonts/averta-normal.woff2';
import avertaBoldFont from '@gnosis.pm/safe-react-components/dist/fonts/averta-bold.woff2';

const GlobalStyle = createGlobalStyle`
@font-face {
font-family: 'Averta';
font-display: swap;
src: local('Averta'), local('Averta Bold'),
url(${avertaFont}) format('woff2'),
url(${avertaBoldFont}) format('woff');
}
`;

export default GlobalStyle;
```

And then include it in the root of your Safe App.

```js
import React from 'react';
import ReactDOM from 'react-dom';
import GlobalStyles from './global';

import App from './App';

ReactDOM.render(
<>
<GlobalStyles />
<App>
</>,
document.getElementById('root')
);
```

## Using the components

You can import every component exported from `@gnosis.pm/safe-react-components` in the same way.
Expand Down
32 changes: 15 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@
"web3-utils": "^1.6.0"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
"@babel/preset-react": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.0",
"@babel/core": "^7.18.0",
"@babel/preset-env": "^7.18.0",
"@babel/preset-react": "^7.18.0",
"@babel/preset-typescript": "^7.18.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@mui/x-data-grid": "4.0.2",
"@storybook/addon-actions": "^6.4.22",
"@storybook/addon-controls": "^6.4.22",
"@storybook/addon-docs": "^6.4.22",
"@storybook/addon-links": "^6.4.22",
"@storybook/addon-storyshots": "^6.4.22",
"@storybook/addons": "^6.4.22",
"@storybook/react": "^6.4.22",
"@storybook/addon-actions": "^6.5.10",
"@storybook/addon-controls": "^6.5.10",
"@storybook/addon-docs": "^6.5.10",
"@storybook/addon-links": "^6.5.10",
"@storybook/addon-storyshots": "^6.5.10",
"@storybook/addons": "^6.5.10",
"@storybook/react": "^6.5.10",
"@testing-library/jest-dom": "^5.11.5",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.2.0",
Expand All @@ -51,17 +51,15 @@
"@types/node": "^16.11.9",
"@types/react": "^16.9.55",
"@types/react-dom": "^16.9.0",
"@types/styled-components": "^5.1.15",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@typescript-eslint/parser": "^4.31.0",
"copy-webpack-plugin": "^6.3.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react-hooks": "^4.3.0",
"ethereum-blockies-base64": "^1.0.2",
"file-loader": "^6.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"jest-styled-components": "^7.0.6",
Expand All @@ -71,7 +69,7 @@
"react-qr-reader": "2.2.1",
"rimraf": "^3.0.2",
"storybook-addon-react-docgen": "^1.2.42",
"styled-components": "^5.3.3",
"styled-components": "^5.3.5",
"ts-loader": "^8.2.0",
"typescript": "^4.5.0",
"url-loader": "^4.1.1",
Expand Down
Binary file removed src/fonts/averta-bold.woff2
Binary file not shown.
Binary file removed src/fonts/averta-normal.woff2
Binary file not shown.
14 changes: 0 additions & 14 deletions src/global.ts

This file was deleted.

Loading