Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/components/List/ListAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ViewProps,
ViewStyle,
PressableAndroidRippleConfig,
Platform,
} from 'react-native';

import { ListAccordionGroupContext } from './ListAccordionGroup';
Expand Down Expand Up @@ -121,6 +122,10 @@ export type Props = {
* `pointerEvents` passed to the `View` container
*/
pointerEvents?: ViewProps['pointerEvents'];
/**
* containerStyle that is passed to the wrapping TouchableRipple element View.
*/
containerStyle?: StyleProp<ViewStyle>;
};

/**
Expand Down Expand Up @@ -184,6 +189,7 @@ const ListAccordion = ({
pointerEvents = 'none',
titleMaxFontSizeMultiplier,
descriptionMaxFontSizeMultiplier,
containerStyle,
}: Props) => {
const theme = useInternalTheme(themeOverrides);
const [expanded, setExpanded] = React.useState<boolean>(
Expand Down Expand Up @@ -236,7 +242,7 @@ const ListAccordion = ({
: handlePressAction;
return (
<View>
<View style={{ backgroundColor: theme?.colors?.background }}>
<View style={[{ backgroundColor: theme?.colors?.background }, containerStyle]}>
<TouchableRipple
style={[theme.isV3 ? styles.containerV3 : styles.container, style]}
onPress={handlePress}
Expand All @@ -250,10 +256,12 @@ const ListAccordion = ({
theme={theme}
background={background}
borderless
accessible={Platform.OS !== 'ios'}
>
<View
style={theme.isV3 ? styles.rowV3 : styles.row}
pointerEvents={pointerEvents}
accessible={Platform.OS=== 'ios'? false: true}
>
{left
? left({
Expand All @@ -263,6 +271,7 @@ const ListAccordion = ({
: null}
<View
style={[theme.isV3 ? styles.itemV3 : styles.item, styles.content]}
accessible={Platform.OS=== 'ios'? false: true}
>
<Text
selectable={false}
Expand Down Expand Up @@ -298,6 +307,7 @@ const ListAccordion = ({
</View>
<View
style={[styles.item, description ? styles.multiline : undefined]}
accessible={Platform.OS=== 'ios'? false: true}
>
{right ? (
right({
Expand Down Expand Up @@ -388,4 +398,4 @@ const styles = StyleSheet.create({
},
});

export default ListAccordion;
export default ListAccordion;
4 changes: 3 additions & 1 deletion src/components/TextInput/TextInputOutlined.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ const TextInputOutlined = ({
}

return (
<View style={viewStyle}>
<View style={viewStyle} accessible={Platform.OS !== 'ios'}>
{/*
Render the outline separately from the container
This is so that the label can overlap the outline
Expand All @@ -358,6 +358,7 @@ const TextInputOutlined = ({
minHeight,
},
]}
accessible={Platform.OS !== 'ios'}
>
{label ? (
<InputLabel
Expand All @@ -372,6 +373,7 @@ const TextInputOutlined = ({
{...labelProps}
labelBackground={LabelBackground}
maxFontSizeMultiplier={rest.maxFontSizeMultiplier}
placeholderColor={outlineColor ?? null}
/>
) : null}
{render?.({
Expand Down
2 changes: 2 additions & 0 deletions src/components/TextInput/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,10 @@ const getOutlinedOutlineInputColor = ({
if (theme.isV3) {
if (disabled) {
if (theme.dark) {
if(customOutlineColor) return customOutlineColor
return 'transparent';
}
if(customOutlineColor) return customOutlineColor
return theme.colors.surfaceDisabled;
}

Expand Down