mattermost-mobile/app/screens/interactive_dialog/dialog_introduction_text.tsx
Daniel Espino García 1d8568ade8
Improve markdown code (#9164)
* Improve markdown code

* Add missing changes

* Simplify style composition

* Address feedback

* Fix color issue introduced by channel banner
2025-11-04 10:05:56 +01:00

47 lines
1.2 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {View} from 'react-native';
import Markdown from '@components/markdown';
import {Screens} from '@constants';
import {useTheme} from '@context/theme';
import {makeStyleSheetFromTheme} from '@utils/theme';
const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
return {
introductionTextView: {
marginHorizontal: 15,
},
introductionText: {
color: theme.centerChannelColor,
},
};
});
type Props = {
value: string;
}
function DialogIntroductionText({value}: Props) {
const theme = useTheme();
const style = getStyleFromTheme(theme);
return (
<View style={style.introductionTextView}>
<Markdown
baseTextStyle={style.introductionText}
disableGallery={true}
value={value}
disableHashtags={true}
disableAtMentions={true}
disableChannelLink={true}
location={Screens.INTERACTIVE_DIALOG}
theme={theme}
/>
</View>
);
}
export default DialogIntroductionText;