-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into siddharth/disable-visual-testing
- Loading branch information
Showing
53 changed files
with
3,704 additions
and
37,555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': minor | ||
--- | ||
|
||
Adds a component for a native select input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': minor | ||
--- | ||
|
||
Adds ChoiceFieldset component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': patch | ||
--- | ||
|
||
Fix type errors due to missing pathname (string) in union type for LocationDescriptor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
componentId: button | ||
title: Button | ||
status: Alpha | ||
source: https://github.com/primer/react/blob/main/src/Button | ||
storybook: '/react/storybook?path=/story/composite-components-button--default-button' | ||
--- | ||
|
||
`Button` is used for actions, like in forms, while `Link` is used for destinations, or moving from one page to another. | ||
|
||
In special cases where you'd like to use a `<a>` styled like a Button, use `<Button as='a'>` and provide an `href`. | ||
|
||
To create a button group, wrap `Button` elements in the `ButtonGroup` element. `ButtonGroup` gets the same props as `Box`. | ||
|
||
## Examples | ||
|
||
### Kitchen sink | ||
|
||
```jsx live | ||
<> | ||
<Button>Button</Button> | ||
<ButtonDanger>Button danger</ButtonDanger> | ||
<ButtonOutline>Button outline</ButtonOutline> | ||
<ButtonPrimary>Button primary</ButtonPrimary> | ||
<ButtonInvisible>Button invisible</ButtonInvisible> | ||
<ButtonClose onClick={() => window.alert('button clicked')} /> | ||
|
||
<ButtonGroup display="block" my={2}> | ||
<Button>Button</Button> | ||
<Button>Button</Button> | ||
<Button>Button</Button> | ||
</ButtonGroup> | ||
|
||
<ButtonTableList>Button table list </ButtonTableList> | ||
</> | ||
``` | ||
|
||
## Props | ||
|
||
Native `<button>` HTML attributes are forwarded to the underlying React `button` component and are not listed below. | ||
|
||
<PropsTable> | ||
<PropsTableRow name="as" type="String" defaultValue="button" description="Sets the HTML tag for the component" /> | ||
<PropsTableRow name="sx" type="SystemStyleObject" defaultValue="{}" description="Additional styles" /> | ||
<PropsTableRow | ||
name="variant" | ||
type="String" | ||
defaultValue="'medium'" | ||
description="A value of `small`, `medium`, or `large` results in smaller or larger Button text size; no effect if `fontSize` prop is set" | ||
/> | ||
</PropsTable> | ||
|
||
## Status | ||
|
||
<ComponentChecklist | ||
items={{ | ||
propsDocumented: true, | ||
noUnnecessaryDeps: true, | ||
adaptsToThemes: true, | ||
adaptsToScreenSizes: true, | ||
fullTestCoverage: false, | ||
usedInProduction: true, | ||
usageExamplesDocumented: false, | ||
designReviewed: false, | ||
a11yReviewed: false, | ||
stableApi: false, | ||
addressedApiFeedback: false, | ||
hasDesignGuidelines: true, | ||
hasFigmaComponent: true | ||
}} | ||
/> |
Oops, something went wrong.