Skip to content

Changeset updates for v35 #1940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 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
12 changes: 8 additions & 4 deletions .changeset/heavy-points-marry.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ If you were using the `Label` component to render issue/PR labels, use the [Issu
```jsx
import {Label} from "@primer/react"

<Label outline>default</Label>
<Label variant="small" outline sx={{borderColor: 'danger.emphasis', color: 'danger.fg'}}>danger</Label>
<>
<Label outline>default</Label>
<Label variant="small" outline sx={{borderColor: 'danger.emphasis', color: 'danger.fg'}}>danger</Label>
</>
```

</td>
Expand All @@ -36,8 +38,10 @@ import {Label} from "@primer/react"
```jsx
import {Label} from "@primer/react"

<Label>default</Label>
<Label size="small" variant="danger">danger</Label>
<>
<Label>default</Label>
<Label size="small" variant="danger">danger</Label>
</>
```

</td>
Expand Down
36 changes: 20 additions & 16 deletions .changeset/many-roses-hammer.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ import { ButtonPrimary, ButtonInvisible,
ButtonOutline, ButtonDanger }
from '@primer/react'

<ButtonPrimary>
<>
<ButtonPrimary>
Primary Button
</ButtonPrimary>
<ButtonInvisible>
</ButtonPrimary>
<ButtonInvisible>
Invisible Button
</ButtonInvisible>
<ButtonOutline>
</ButtonInvisible>
<ButtonOutline>
Outline Button
</ButtonOutline>
<ButtonDanger>
</ButtonOutline>
<ButtonDanger>
Danger Button
</ButtonDanger>
</ButtonDanger>
</>
```

</td>
Expand All @@ -46,18 +48,20 @@ from '@primer/react'

import { Button } from '@primer/react'

<Button variant="primary">
<>
<Button variant="primary">
Primary Button
</Button>
<Button variant="invisible">
</Button>
<Button variant="invisible">
Invisible Button
</Button>
<Button variant="outline">
</Button>
<Button variant="outline">
Outline Button
</Button>
<Button variant="danger">
</Button>
<Button variant="danger">
Danger Button
</Button>
</Button>
</>
```

</td>
Expand Down
180 changes: 92 additions & 88 deletions .changeset/nervous-pets-sleep.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,51 @@ The `CheckboxGroup` and `RadioGroup` components are replacing the `ChoiceFieldse
```jsx
import {ChoiceFieldset} from "@primer/react"

// Multi-select
<ChoiceFieldset>
<ChoiceFieldset.Legend>
Preferred Primer component interface
</ChoiceFieldset.Legend>

<ChoiceFieldset.List selectionVariant="multiple">
<ChoiceFieldset.Item value="figma">
Figma library
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="css">
Primer CSS
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="react">
Primer React components
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="viewcomponents">
Primer ViewComponents
</ChoiceFieldset.Item>
</ChoiceFieldset.List>
</ChoiceFieldset>

// Single select
<ChoiceFieldset>
<ChoiceFieldset.Legend>
Preferred Primer component interface
</ChoiceFieldset.Legend>

<ChoiceFieldset.List>
<ChoiceFieldset.Item value="figma">
Figma library
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="css">
Primer CSS
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="react">
Primer React components
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="viewcomponents">
Primer ViewComponents
</ChoiceFieldset.Item>
</ChoiceFieldset.List>
</ChoiceFieldset>
<>
// Multi-select
<ChoiceFieldset>
<ChoiceFieldset.Legend>
Preferred Primer component interface
</ChoiceFieldset.Legend>

<ChoiceFieldset.List selectionVariant="multiple">
<ChoiceFieldset.Item value="figma">
Figma library
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="css">
Primer CSS
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="react">
Primer React components
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="viewcomponents">
Primer ViewComponents
</ChoiceFieldset.Item>
</ChoiceFieldset.List>
</ChoiceFieldset>

// Single select
<ChoiceFieldset>
<ChoiceFieldset.Legend>
Preferred Primer component interface
</ChoiceFieldset.Legend>

<ChoiceFieldset.List>
<ChoiceFieldset.Item value="figma">
Figma library
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="css">
Primer CSS
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="react">
Primer React components
</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="viewcomponents">
Primer ViewComponents
</ChoiceFieldset.Item>
</ChoiceFieldset.List>
</ChoiceFieldset>
</>

```

Expand All @@ -72,51 +74,53 @@ import {ChoiceFieldset} from "@primer/react"
```jsx
import {FormGroup, Checkbox} from "@primer/react"

// Multi-select
<CheckboxGroup>
<CheckboxGroup.Label>
Preferred Primer component interface
</CheckboxGroup.Label>
<FormControl>
<Checkbox value="figma" />
<FormControl.Label>Figma</FormControl.Label>
</FormControl>
<FormControl>
<Checkbox value="css" />
<FormControl.Label>CSS</FormControl.Label>
</FormControl>
<FormControl>
<Checkbox value="react" />
<FormControl.Label>Primer React components</FormControl.Label>
</FormControl>
<FormControl>
<Checkbox value="viewcomponents" />
<FormControl.Label>Primer ViewComponents</FormControl.Label>
</FormControl>
</CheckboxGroup>

// Single select
<RadioGroup name="preferred-primer">
<RadioGroup.Label>
Preferred Primer component interface
</RadioGroup.Label>
<FormControl>
<Radio value="figma" />
<FormControl.Label>Figma</FormControl.Label>
</FormControl>
<FormControl>
<Radio value="css" />
<FormControl.Label>CSS</FormControl.Label>
</FormControl>
<FormControl>
<Radio value="react" />
<FormControl.Label>Primer React components</FormControl.Label>
</FormControl>
<FormControl>
<Radio value="viewcomponents" />
<FormControl.Label>Primer ViewComponents</FormControl.Label>
</FormControl>
</RadioGroup>
<>
// Multi-select
<CheckboxGroup>
<CheckboxGroup.Label>
Preferred Primer component interface
</CheckboxGroup.Label>
<FormControl>
<Checkbox value="figma" />
<FormControl.Label>Figma</FormControl.Label>
</FormControl>
<FormControl>
<Checkbox value="css" />
<FormControl.Label>CSS</FormControl.Label>
</FormControl>
<FormControl>
<Checkbox value="react" />
<FormControl.Label>Primer React components</FormControl.Label>
</FormControl>
<FormControl>
<Checkbox value="viewcomponents" />
<FormControl.Label>Primer ViewComponents</FormControl.Label>
</FormControl>
</CheckboxGroup>

// Single select
<RadioGroup name="preferred-primer">
<RadioGroup.Label>
Preferred Primer component interface
</RadioGroup.Label>
<FormControl>
<Radio value="figma" />
<FormControl.Label>Figma</FormControl.Label>
</FormControl>
<FormControl>
<Radio value="css" />
<FormControl.Label>CSS</FormControl.Label>
</FormControl>
<FormControl>
<Radio value="react" />
<FormControl.Label>Primer React components</FormControl.Label>
</FormControl>
<FormControl>
<Radio value="viewcomponents" />
<FormControl.Label>Primer ViewComponents</FormControl.Label>
</FormControl>
</RadioGroup>
</>
```

</td>
Expand Down
51 changes: 27 additions & 24 deletions .changeset/olive-bears-act.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,26 @@ The `FormControl` component is replacing the `FormGroup`, `InputField`, and `Cho
```jsx
import {FormControl, Checkbox, TextInput} from "@primer/react"

<>
<FormGroup>
<FormGroup.Label htmlFor="example-text">Example text</FormGroup.Label>
<TextInput id="example-text" />
</FormGroup>

<FormGroup>
<FormGroup.Label htmlFor="example-text">Example text</FormGroup.Label>
<TextInput id="example-text" />
</FormGroup>
// OR

// OR
<InputField>
<InputField.Label>Example text</InputField.Label>
<TextInput />
</InputField>

<InputField>
<InputField.Label>Example text</InputField.Label>
<TextInput />
</InputField>

// OR
// OR

<ChoiceInputField>
<ChoiceInputField.Label>Example text</ChoiceInputField.Label>
<Checkbox />
</ChoiceInputField>
<ChoiceInputField>
<ChoiceInputField.Label>Example text</ChoiceInputField.Label>
<Checkbox />
</ChoiceInputField>
</>

```

Expand All @@ -46,17 +47,19 @@ import {FormControl, Checkbox, TextInput} from "@primer/react"
```jsx
import {FormGroup, TextInput} from "@primer/react"

<FormControl>
<FormControl.Label>Example text</FormControl.Label>
<TextInput />
</FormControl>
<>
<FormControl>
<FormControl.Label>Example text</FormControl.Label>
<TextInput />
</FormControl>

// OR
// OR

<FormControl>
<FormControl.Label>Example text</FormControl.Label>
<Checkbox />
</FormControl>
<FormControl>
<FormControl.Label>Example text</FormControl.Label>
<Checkbox />
</FormControl>
</>

```

Expand Down