You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dialog no longer accepts styled-system props. Please use the `sx` prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information about `sx` and https://primer.style/react/system-props for context on the removal.
Copy file name to clipboardExpand all lines: docs/content/Dialog.md
+15-18Lines changed: 15 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -84,25 +84,22 @@ You can also pass any non-text content into the header:
84
84
</State>
85
85
```
86
86
87
-
## System props
88
-
89
-
<Note variant="warning">
90
-
91
-
System props are deprecated in all components except [Box](/Box). Please use the [`sx` prop](/overriding-styles) instead.
92
-
93
-
</Note>
87
+
## Component props
94
88
95
-
`Dialog` components get the `COMMON` and `LAYOUT` categories of system props. `Dialog.Header` components get `COMMON`, `LAYOUT`, and `FLEX` system props. Read our [System Props](/system-props) doc page for a full list of available props.
| isOpen | Boolean | | Set whether or not the dialog is shown |
94
+
| onDismiss | Function | | A user-provided function that should close the dialog |
95
+
| returnFocusRef | React ref | | The element to restore focus back to after the `Dialog` is closed |
96
+
| initialFocusRef | React ref | | Element inside of the `Dialog` you'd like to be focused when the Dialog is opened. If nothing is passed to `initialFocusRef` the close button is focused. |
97
+
| aria-labelledby | string || Pass an id to use for the aria-label. Use either a `aria-label` or an `aria-labelledby` but not both. |
98
+
| aria-label | string || Pass a label to be used to describe the Dialog. Use either a `aria-label` or an `aria-labelledby` but not both. |
99
+
| sx | SystemStyleObject | {} | Style to be applied to the component |
| isOpen | Boolean | Set whether or not the dialog is shown |
102
-
| onDismiss | Function | A user-provided function that should close the dialog |
103
-
| returnFocusRef | React ref | The element to restore focus back to after the `Dialog` is closed |
104
-
| initialFocusRef | React ref | Element inside of the `Dialog` you'd like to be focused when the Dialog is opened. If nothing is passed to `initialFocusRef` the close button is focused. |
105
-
| aria-labelledby | string | Pass an id to use for the aria-label. Use either a `aria-label` or an `aria-labelledby` but not both. |
106
-
| aria-label | string | Pass a label to be used to describe the Dialog. Use either a `aria-label` or an `aria-labelledby` but not both. |
101
+
### Dialog.Header
107
102
108
-
`Dialog.Header` does not take any non-system props.
0 commit comments