Skip to content

Commit 7ad9b81

Browse files
authored
feat(styled-react): add all components as exports (#6612)
1 parent 8e9d384 commit 7ad9b81

File tree

5 files changed

+86
-6
lines changed

5 files changed

+86
-6
lines changed

.changeset/gentle-rockets-go.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/styled-react': minor
3+
---
4+
5+
Add all components from @primer/react as exports to package

packages/styled-react/src/__tests__/__snapshots__/exports.test.ts.snap

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,73 @@ exports[`@primer/styled-react exports 1`] = `
44
[
55
"ActionList",
66
"ActionMenu",
7-
"Box",
7+
"Autocomplete",
8+
"Avatar",
9+
"BranchName",
810
"Breadcrumbs",
911
"Button",
12+
"Checkbox",
13+
"CheckboxGroup",
14+
"CircleBadge",
15+
"CircleOcticon",
16+
"CounterLabel",
17+
"Details",
18+
"Dialog",
1019
"Flash",
1120
"FormControl",
21+
"Header",
1222
"Heading",
1323
"IconButton",
1424
"Label",
25+
"LabelGroup",
1526
"Link",
1627
"LinkButton",
28+
"NavList",
29+
"Overlay",
30+
"PageHeader",
1731
"PageLayout",
32+
"Popover",
33+
"ProgressBar",
34+
"RadioGroup",
35+
"RelativeTime",
36+
"SegmentedControl",
37+
"Select",
38+
"SelectPanel",
39+
"SideNav",
40+
"Spinner",
41+
"Stack",
42+
"StateLabel",
43+
"SubNav",
1844
"Text",
45+
"Textarea",
1946
"TextInput",
47+
"TextInputWithTokens",
48+
"Timeline",
49+
"ToggleSwitch",
50+
"Token",
51+
"Tooltip",
2052
"Truncate",
53+
"UnderlineNav",
54+
"Box",
2155
"sx",
2256
]
2357
`;
2458

2559
exports[`@primer/styled-react/deprecated exports 1`] = `
2660
[
61+
"Dialog",
2762
"Octicon",
63+
"TabNav",
64+
"Tooltip",
2865
]
2966
`;
3067

3168
exports[`@primer/styled-react/experimental exports 1`] = `
3269
[
3370
"Dialog",
71+
"PageHeader",
72+
"Table",
73+
"Tooltip",
74+
"UnderlinePanels",
3475
]
3576
`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export {Octicon} from '@primer/react/deprecated'
1+
export {Dialog, Octicon, TabNav, Tooltip} from '@primer/react/deprecated'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export {Dialog} from '@primer/react/experimental'
1+
export {Dialog, PageHeader, Table, Tooltip, UnderlinePanels} from '@primer/react/experimental'

packages/styled-react/src/index.ts

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,57 @@
11
export {
22
ActionList,
33
ActionMenu,
4-
Box,
5-
type BoxProps,
4+
Autocomplete,
5+
Avatar,
6+
BranchName,
67
Breadcrumbs,
78
Button,
9+
Checkbox,
10+
CheckboxGroup,
11+
CircleBadge,
12+
CircleOcticon,
13+
CounterLabel,
14+
Details,
15+
Dialog,
816
Flash,
917
FormControl,
18+
Header,
1019
Heading,
1120
IconButton,
1221
Label,
22+
LabelGroup,
1323
Link,
1424
LinkButton,
25+
NavList,
26+
Overlay,
27+
PageHeader,
1528
PageLayout,
29+
Popover,
30+
ProgressBar,
31+
RadioGroup,
32+
RelativeTime,
33+
SegmentedControl,
34+
Select,
35+
SelectPanel,
36+
SideNav,
37+
Spinner,
38+
Stack,
39+
StateLabel,
40+
SubNav,
1641
Text,
42+
Textarea,
1743
TextInput,
44+
TextInputWithTokens,
45+
Timeline,
46+
ToggleSwitch,
47+
Token,
48+
Tooltip,
1849
Truncate,
50+
UnderlineNav,
1951

20-
// Utilities for working with the `sx` prop
52+
// styled-components components or types
53+
Box,
54+
type BoxProps,
2155
sx,
2256
type SxProp,
2357
type BetterSystemStyleObject,

0 commit comments

Comments
 (0)