diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 30c87e5..fb61d7a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -3,7 +3,7 @@ name: Release
on:
push:
branches:
- - main
+ - main2 # Disabling for now until we can get this working (https://github.com/carbon-design-system/carbon-react-native/issues/150)
jobs:
build:
if:
diff --git a/example/src/Views/Accordion.tsx b/example/src/Views/Accordion.tsx
index 73a149e..cb5da7b 100644
--- a/example/src/Views/Accordion.tsx
+++ b/example/src/Views/Accordion.tsx
@@ -37,11 +37,11 @@ export default class TestAccordion extends React.Component {
-
+
-
+
diff --git a/src/components/Accordion/index.tsx b/src/components/Accordion/index.tsx
index a56cd55..3cdebdf 100644
--- a/src/components/Accordion/index.tsx
+++ b/src/components/Accordion/index.tsx
@@ -4,7 +4,7 @@ import { getColor } from '../../styles/colors';
import { createIcon, pressableFeedbackStyle, styleReferenceBreaker } from '../../helpers';
import ChevronDownIcon from '@carbon/icons/es/chevron--down/20';
import ChevronUpIcon from '@carbon/icons/es/chevron--up/20';
-import { Text } from '../Text';
+import { Text, TextBreakModes } from '../Text';
export type AccordionProps = {
/** Title to show for the accordion */
@@ -17,6 +17,8 @@ export type AccordionProps = {
onPress?: (value: boolean, event: GestureResponderEvent) => void;
/** Indicate if disabled */
disabled?: boolean;
+ /** Break mode for text. Default is to wrap text */
+ textBreakMode?: TextBreakModes;
/** Style to set on the item */
style?: StyleProp;
/** Direct props to set on the React Native component (including iOS and Android specific props). Most use cases should not need this. */
@@ -50,7 +52,7 @@ export class Accordion extends React.Component {
},
action: {
position: 'relative',
- height: 48,
+ minHeight: 48,
padding: 13,
paddingLeft: 16,
paddingRight: 50,
@@ -61,6 +63,7 @@ export class Accordion extends React.Component {
right: 12,
},
textItem: {
+ flex: 1,
color: this.itemColor,
},
});
@@ -98,7 +101,7 @@ export class Accordion extends React.Component {
}
render(): React.ReactNode {
- const { componentProps, style, disabled, title, children, firstAccordion } = this.props;
+ const { componentProps, style, disabled, title, children, firstAccordion, textBreakMode } = this.props;
const { open } = this.state;
const finalStyle = styleReferenceBreaker(this.styles.wrapper);
@@ -110,7 +113,7 @@ export class Accordion extends React.Component {
return (
pressableFeedbackStyle(state, this.styles.action, this.getStateStyle)} accessibilityLabel={title} accessibilityRole="togglebutton" onPress={this.toggleDropdown} disabled={disabled}>
-
+
{this.accordionIcon}
{open && {children}}