@czi-sds/components 19.3.0 → 20.0.0

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 CHANGED
@@ -4,7 +4,7 @@ The Science Design System (SDS) brings consistency and universal standards to CZ
4
4
 
5
5
  ## Design System Documentation
6
6
 
7
- `@czi-sds/components` implements the Science Design System as documented in [Zeroheight](https://sds.czi.design/). As a result, it's very useful to get familiar with the available **theme variables**, such as `colors`, `spacings`, `typography`, etc., so you can leverage the theme properly in your application.
7
+ `@czi-sds/components` implements the Science Design System as documented in [Zeroheight](https://sds.czi.design/). As a result, it's very useful to get familiar with the available **theme variables**, such as `colors`, `spaces`, `typography`, etc., so you can leverage the theme properly in your application.
8
8
 
9
9
  ![Science Design System Zeroheight Homepage Snapshot](https://user-images.githubusercontent.com/6309723/155802483-366008aa-7380-4a01-b356-ae0ab02f4f3b.png)
10
10
 
@@ -93,24 +93,24 @@ export const Title - styled(Typography)`
93
93
 
94
94
  ```ts
95
95
  import { css, SerializedStyles } from "@emotion/react";
96
- import { styled } from '@mui/material/styles';
96
+ import { styled } from "@mui/material/styles";
97
97
  import { getColors, getCorners } from "@czi-sds/components";
98
98
 
99
99
  export const Tag = styled("div")`
100
100
  // This is a callback function that returns more CSS rules, but the only way
101
101
  // to access the custom theme object
102
- ${(props) => {
103
- // getColors() is a selector that picks out colors from the theme object
104
- const colors = getColors(props);
105
- // getSpaces() is a selector that picks out spacings from the theme object
106
- const spacings = getSpaces(props);
102
+ ${(props) => {
103
+ // getColors() is a selector that picks out colors from the theme object
104
+ const colors = getColors(props);
105
+ // getSpaces() is a selector that picks out spaces from the theme object
106
+ const spaces = getSpaces(props);
107
107
 
108
- return `
108
+ return `
109
109
  background-color: ${colors?.gray[500]};
110
- padding-bottom: ${spacings?.m}px;
111
- margin-bottom: ${spacings?.xxl}px;
110
+ padding-bottom: ${spaces?.m}px;
111
+ margin-bottom: ${spaces?.xxl}px;
112
112
  `;
113
- }}
113
+ }}
114
114
  `;
115
115
  ```
116
116
 
@@ -199,9 +199,14 @@ To use the default theme in your React application, complete the following:
199
199
 
200
200
  ```html
201
201
  // installs the sds font from google fonts
202
- <link rel="preconnect" href="https://fonts.gstatic.com" />
202
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
203
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
204
+ <link
205
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
206
+ rel="stylesheet"
207
+ />
203
208
  <link
204
- href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400;1,600;1,700&display=swap"
209
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
205
210
  rel="stylesheet"
206
211
  />
207
212
  ```