Skip to content

Commit 4bd3bd0

Browse files
committed
Run npm run format for all packages
1 parent 543dd9d commit 4bd3bd0

File tree

15 files changed

+103
-60
lines changed

15 files changed

+103
-60
lines changed

packages/design-system-website/foundations/Responsiveness.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Overview
1+
## Mixins
22

33
This system remains mostly unopinionated on responsive tools, but the `sass-variables` package contains a few mixins to help you customize your own styles based on the viewport width:
44

@@ -23,7 +23,7 @@ This system remains mostly unopinionated on responsive tools, but the `sass-vari
2323
}
2424
```
2525

26-
### Breakpoint widths
26+
## Breakpoints
2727

2828
The mixins respond to three sizes by default:
2929

@@ -52,7 +52,7 @@ $breakpoints: (
5252
}
5353
```
5454

55-
### Which mixin should I use?
55+
## Which mixin should I use?
5656

5757
The conventional wisdom of "mobile-first" design encourages designing at the smallest widths first, then progressively enhancing the design for larger sizes. This tends to improve the responsiveness of the design overall, since it forces a focus on multiple sizes from the beginning.
5858

packages/react-components/source/react/library/alert/Alert.md

+20-15
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ class CustomError extends Error {
139139
Errors of any valid type will be displayed automatically:
140140
141141
```jsx
142-
143142
const extendedError = {
144-
message: 'There\'s no reason to become alarmed',
143+
message: "There's no reason to become alarmed",
145144
causes: [
146145
{
147-
message: 'and we hope you\'ll enjoy the rest of your flight.',
146+
message: "and we hope you'll enjoy the rest of your flight.",
148147
causes: [
149148
{
150-
message: 'By the way, is there anyone on board who knows how to fly a plane?'
151-
}
152-
]
149+
message:
150+
'By the way, is there anyone on board who knows how to fly a plane?',
151+
},
152+
],
153153
},
154-
]
154+
],
155155
};
156156

157157
<div>
@@ -162,31 +162,36 @@ const extendedError = {
162162
<Alert.Error error="The autopilot is deflating!" />
163163
</Alert>
164164
<Alert type="info" style={{ marginBottom: 5 }}>
165-
<Alert.Error error={new Error('Looks like I picked the wrong week to quit sniffing glue.')} />
165+
<Alert.Error
166+
error={
167+
new Error('Looks like I picked the wrong week to quit sniffing glue.')
168+
}
169+
/>
166170
</Alert>
167-
</div>
171+
</div>;
168172
```
169173
170174
#### Cause sensitivity:
171175
172176
A primary usecase for this meta-component is to automatically display API-generated errors. In this scenario it is likely that some errors returned as causes will be overly technical, and therefor not fit for display to end-users. To solve for this case, the Error alert will hide `causes` with a numerical `sensitivity` index that is greater than zero:
173177
174178
```jsx
175-
176179
const extendedError = {
177180
message: 'Yo, your stuff is whack!',
178181
causes: [
179182
{
180-
message: 'This is the reason for whackness we will display to the user, but there is more!',
183+
message:
184+
'This is the reason for whackness we will display to the user, but there is more!',
181185
},
182186
{
183-
message: 'Jargony jargon jargon this is the technical reason why it is whack',
187+
message:
188+
'Jargony jargon jargon this is the technical reason why it is whack',
184189
sensitivity: 50,
185-
}
186-
]
190+
},
191+
],
187192
};
188193

189194
<Alert type="danger">
190195
<Alert.Error error={extendedError} />
191-
</Alert>
196+
</Alert>;
192197
```

packages/react-components/source/react/library/button-select/ButtonSelect.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const options = [
2121
console.log('New Value:', value);
2222
setState({ value });
2323
}}
24-
/>
24+
/>;
2525
```
2626

2727
## Types
@@ -281,5 +281,5 @@ const options = [
281281
setState({ value });
282282
}}
283283
width="100px"
284-
/>
284+
/>;
285285
```

packages/react-components/source/react/library/colors/Colors.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ const colors = ['brand-primary', 'brand-secondary'];
2424

2525
## UI palette
2626

27-
Code should always reference the Sass color variable (instead of directly referencing hex values). The variable definitions are located in [_palettes.scss](https://github.com/puppetlabs/design-system/blob/master/packages/sass-variables/_palettes.scss) in the `sass-variables` package, e.g. `$puppet-black`, `$puppet-n950`, etc.
28-
29-
27+
Code should always reference the Sass color variable (instead of directly referencing hex values). The variable definitions are located in [\_palettes.scss](https://github.com/puppetlabs/design-system/blob/master/packages/sass-variables/_palettes.scss) in the `sass-variables` package, e.g. `$puppet-black`, `$puppet-n950`, etc.
3028

3129
### Neutral colors
3230

packages/react-components/source/react/library/content/Content.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ The `Content` component is a wrapper for simple HTML content, which provides def
281281
<li>
282282
<p>
283283
For more information on our curated step specifications, see{' '}
284-
<a href="/documentation/step-specifications">Step specifications</a>
285-
.
284+
<a href="/documentation/step-specifications">Step specifications</a>.
286285
</p>
287286
</li>
288287
<li>

packages/react-components/source/react/library/form/Form.md

-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ Field-level errors may be supplied in an object under the `items` key. The keys
368368

369369
Here is an example custom error object, including both `causes` and `items`:
370370

371-
372371
```js static
373372
{
374373
message: 'Top-level error message',

packages/react-components/source/react/library/icon/Icon.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ const Renderer = () => {
117117

118118
return (
119119
<div className="rc-sg-wrapper">
120-
<Icon
121-
svg={customIcon.svg}
122-
viewBox={customIcon.viewBox}
123-
/>
120+
<Icon svg={customIcon.svg} viewBox={customIcon.viewBox} />
124121
</div>
125122
);
126123
};

packages/react-components/source/react/library/input/Input.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const exampleStyle = { marginBottom: 10 };
5959
/>
6060
</form>;
6161
```
62+
6263
## Variations
6364

6465
### Simple
@@ -86,7 +87,7 @@ Optional leading icons may be added where needed to provide more immediate conte
8687
const exampleStyle = { marginBottom: 10 };
8788

8889
<div>
89-
<Input
90+
<Input
9091
name="input-ex11"
9192
value={state['input-ex11-value']}
9293
icon="search"

packages/react-components/source/react/library/link/Link.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ Consider these 3 states for links: hover, focused and pressed (similar to [Butto
1818
Primary inline links are blue (B500), to differentiate from the text around them. There are two sizes for inline links: The default size, and a small size.
1919

2020
```jsx
21-
<Link as="a" href="http://google.com" target="_blank">Primary Link</Link>
21+
<Link as="a" href="http://google.com" target="_blank">
22+
Primary Link
23+
</Link>
2224
```
2325

2426
### Secondary Links
2527

2628
Secondary links use the color of the text around them. In order to meet WCAG AA 2.0 standards, the initial state must be underlined. Hover, focus, and pressed states are the same as blue inline links.
2729

2830
```jsx
29-
<Link type="secondary" as="a" href="http://google.com" target="_blank">Secondary Link</Link>
31+
<Link type="secondary" as="a" href="http://google.com" target="_blank">
32+
Secondary Link
33+
</Link>
3034
```
3135

3236
## Variations
@@ -38,7 +42,9 @@ This variation is a link that acts like a [Button](#/React%20Components/Button),
3842
```jsx
3943
import Button from '../button';
4044

41-
<Link as={Button} onClick={() => console.log('Clicked link as button')}>Link as Button</Link>
45+
<Link as={Button} onClick={() => console.log('Clicked link as button')}>
46+
Link as Button
47+
</Link>;
4248
```
4349

4450
# Related

packages/react-components/source/react/library/loading/Loading.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,18 @@ import Text from '../text';
1919
<table className="rc-loading-table">
2020
<thead>
2121
<tr>
22-
<th><Text>Large (default)</Text></th>
23-
<th><Text>Small</Text></th>
24-
<th><Text>Tiny</Text></th>
25-
<th><Text>Custom</Text></th>
22+
<th>
23+
<Text>Large (default)</Text>
24+
</th>
25+
<th>
26+
<Text>Small</Text>
27+
</th>
28+
<th>
29+
<Text>Tiny</Text>
30+
</th>
31+
<th>
32+
<Text>Custom</Text>
33+
</th>
2634
</tr>
2735
</thead>
2836
<tbody>
@@ -41,7 +49,7 @@ import Text from '../text';
4149
</td>
4250
</tr>
4351
</tbody>
44-
</table>
52+
</table>;
4553
```
4654

4755
## Related

packages/react-components/source/react/library/modal/Modal.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ import Button from '../button';
131131
const [open, setOpen] = React.useState(false);
132132

133133
<>
134-
<Button onClick={() => setOpen(true)}>Open modal with right-aligned buttons</Button>
134+
<Button onClick={() => setOpen(true)}>
135+
Open modal with right-aligned buttons
136+
</Button>
135137

136138
{open && (
137139
<Modal onClose={() => setOpen(false)}>

packages/react-components/source/react/library/select/Select.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const style = { margin: 10 };
4141
/>
4242
</div>;
4343
```
44+
4445
## Variations
4546

4647
### Autocomplete

packages/react-components/source/react/library/table/Table.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,33 @@ A unique key can also be provided via a function:
193193
Use the `hideOverflow` flag if you want to hide long cell content with an ellipses. The flag only affects the column it is turned on for.
194194

195195
<!-- prettier-ignore-start -->
196+
196197
```jsx
197198
const data = [
198-
{ id: 1, type: 'Lorem ipsum', passage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', characters: 123 },
199+
{
200+
id: 1,
201+
type: 'Lorem ipsum',
202+
passage:
203+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
204+
characters: 123,
205+
},
199206
{ id: 2, type: 'Cicero', passage: 'Sed ut perspiciatis', characters: 19 },
200-
{ id: 3, type: '1914', passage: 'But I must explain to you how all this mistaken idea', characters: 52 },
207+
{
208+
id: 3,
209+
type: '1914',
210+
passage: 'But I must explain to you how all this mistaken idea',
211+
characters: 52,
212+
},
201213
];
202214

203215
const columns = [
204216
{ label: 'Types', dataKey: 'type' },
205-
{ label: 'Passage', dataKey: 'passage', style: { width: '50%'}, hideOverflow: true },
217+
{
218+
label: 'Passage',
219+
dataKey: 'passage',
220+
style: { width: '50%' },
221+
hideOverflow: true,
222+
},
206223
{ label: 'Character Length', dataKey: 'characters' },
207224
];
208225

packages/react-components/source/react/library/tabs/Tabs.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ import Text from '../text';
4545
<Text>Whatever is nested inside the Tab become the Panel content.</Text>
4646
</Tabs.Tab>
4747
<Tabs.Tab title="Tab 3">
48-
<Text>To change the default tab, set the activeTab prop on Tabs equal to the
49-
desired Tab ID.</Text>
48+
<Text>
49+
To change the default tab, set the activeTab prop on Tabs equal to the
50+
desired Tab ID.
51+
</Text>
5052
</Tabs.Tab>
51-
</Tabs>
53+
</Tabs>;
5254
```
5355

5456
## Controlled Mode

0 commit comments

Comments
 (0)