carbon-react 116.1.3 → 116.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/accordion/accordion.component.d.ts +1 -1
- package/esm/components/accordion/accordion.component.js +2 -2
- package/esm/components/accordion/accordion.style.d.ts +1 -1
- package/esm/components/accordion/accordion.style.js +1 -1
- package/lib/components/accordion/accordion.component.d.ts +1 -1
- package/lib/components/accordion/accordion.component.js +2 -2
- package/lib/components/accordion/accordion.style.d.ts +1 -1
- package/lib/components/accordion/accordion.style.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { SpaceProps } from "styled-system";
|
|
|
3
3
|
import { StyledAccordionContainerProps } from "./accordion.style";
|
|
4
4
|
export interface AccordionProps extends StyledAccordionContainerProps, SpaceProps {
|
|
5
5
|
/** Width of the buttonHeading when it's set, defaults to 150px */
|
|
6
|
-
buttonWidth?: number;
|
|
6
|
+
buttonWidth?: number | string;
|
|
7
7
|
/** Content of the Accordion component */
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
/** Set the default state of expansion of the Accordion if component is meant to be used as uncontrolled */
|
|
@@ -29,7 +29,7 @@ const Accordion = /*#__PURE__*/React.forwardRef(({
|
|
|
29
29
|
warning,
|
|
30
30
|
info,
|
|
31
31
|
buttonHeading,
|
|
32
|
-
buttonWidth =
|
|
32
|
+
buttonWidth = "150px",
|
|
33
33
|
openTitle,
|
|
34
34
|
...rest
|
|
35
35
|
}, ref) => {
|
|
@@ -130,7 +130,7 @@ const Accordion = /*#__PURE__*/React.forwardRef(({
|
|
|
130
130
|
Accordion.propTypes = {
|
|
131
131
|
"borders": PropTypes.oneOf(["default", "full", "none"]),
|
|
132
132
|
"buttonHeading": PropTypes.bool,
|
|
133
|
-
"buttonWidth": PropTypes.number,
|
|
133
|
+
"buttonWidth": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
134
134
|
"children": PropTypes.node,
|
|
135
135
|
"defaultExpanded": PropTypes.bool,
|
|
136
136
|
"disableContentPadding": PropTypes.bool,
|
|
@@ -28,7 +28,7 @@ interface StyledAccordionHeadingsContainerProps {
|
|
|
28
28
|
declare const StyledAccordionHeadingsContainer: import("styled-components").StyledComponent<"div", any, StyledAccordionHeadingsContainerProps, never>;
|
|
29
29
|
interface StyledAccordionTitleContainerProps {
|
|
30
30
|
buttonHeading?: boolean;
|
|
31
|
-
buttonWidth?: number;
|
|
31
|
+
buttonWidth?: number | string;
|
|
32
32
|
hasButtonProps?: boolean;
|
|
33
33
|
iconAlign?: "left" | "right";
|
|
34
34
|
size?: "large" | "small";
|
|
@@ -3,7 +3,7 @@ import { SpaceProps } from "styled-system";
|
|
|
3
3
|
import { StyledAccordionContainerProps } from "./accordion.style";
|
|
4
4
|
export interface AccordionProps extends StyledAccordionContainerProps, SpaceProps {
|
|
5
5
|
/** Width of the buttonHeading when it's set, defaults to 150px */
|
|
6
|
-
buttonWidth?: number;
|
|
6
|
+
buttonWidth?: number | string;
|
|
7
7
|
/** Content of the Accordion component */
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
/** Set the default state of expansion of the Accordion if component is meant to be used as uncontrolled */
|
|
@@ -49,7 +49,7 @@ const Accordion = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
49
49
|
warning,
|
|
50
50
|
info,
|
|
51
51
|
buttonHeading,
|
|
52
|
-
buttonWidth =
|
|
52
|
+
buttonWidth = "150px",
|
|
53
53
|
openTitle,
|
|
54
54
|
...rest
|
|
55
55
|
}, ref) => {
|
|
@@ -152,7 +152,7 @@ exports.Accordion = Accordion;
|
|
|
152
152
|
Accordion.propTypes = {
|
|
153
153
|
"borders": _propTypes.default.oneOf(["default", "full", "none"]),
|
|
154
154
|
"buttonHeading": _propTypes.default.bool,
|
|
155
|
-
"buttonWidth": _propTypes.default.number,
|
|
155
|
+
"buttonWidth": _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
156
156
|
"children": _propTypes.default.node,
|
|
157
157
|
"defaultExpanded": _propTypes.default.bool,
|
|
158
158
|
"disableContentPadding": _propTypes.default.bool,
|
|
@@ -28,7 +28,7 @@ interface StyledAccordionHeadingsContainerProps {
|
|
|
28
28
|
declare const StyledAccordionHeadingsContainer: import("styled-components").StyledComponent<"div", any, StyledAccordionHeadingsContainerProps, never>;
|
|
29
29
|
interface StyledAccordionTitleContainerProps {
|
|
30
30
|
buttonHeading?: boolean;
|
|
31
|
-
buttonWidth?: number;
|
|
31
|
+
buttonWidth?: number | string;
|
|
32
32
|
hasButtonProps?: boolean;
|
|
33
33
|
iconAlign?: "left" | "right";
|
|
34
34
|
size?: "large" | "small";
|
|
@@ -180,7 +180,7 @@ const StyledAccordionTitleContainer = _styledComponents.default.div`
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
${buttonWidth && (0, _styledComponents.css)`
|
|
183
|
-
width: ${buttonWidth}px;
|
|
183
|
+
width: ${typeof buttonWidth === "number" ? `${buttonWidth}px` : buttonWidth};
|
|
184
184
|
`}
|
|
185
185
|
`}
|
|
186
186
|
`}
|