* Add Report a Problem functionality * update cache pinned SHA version from 4.0.2 to 4.2.0 * Address feedback * Fix tests * Fix some issues and update kotlin coroutines version * Fix delete file for iOS * Bump 1 more version for coroutines * Use rxjava instead of kotlin coroutines to avoid security issue * Move path prefix to avoid test error * Address feedback * Address feedback * Address feedback * Use mailto on iOS * Fix tests related to button changes * Address feedback * Update icon and fix onboarding buttons * Fix test --------- Co-authored-by: Angelos Kyratzakos <angelos.kyratzakos@mattermost.com> Co-authored-by: Mattermost Build <build@mattermost.com>
35 lines
873 B
TypeScript
35 lines
873 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
|
|
import {useTheme} from '@context/theme';
|
|
|
|
import Button from '../button';
|
|
|
|
type ButtonProps = {
|
|
button: SectionNoticeButtonProps;
|
|
emphasis: 'primary' | 'tertiary' | 'link';
|
|
}
|
|
|
|
const SectionNoticeButton = ({
|
|
button,
|
|
emphasis,
|
|
}: ButtonProps) => {
|
|
const theme = useTheme();
|
|
const leadingIcon = button.leadingIcon ? {iconName: button.leadingIcon} : {};
|
|
const trailingIcon = button.trailingIcon ? {iconName: button.trailingIcon} : {};
|
|
|
|
return (
|
|
<Button
|
|
onPress={button.onClick}
|
|
text={button.text}
|
|
theme={theme}
|
|
emphasis={emphasis}
|
|
{...leadingIcon}
|
|
{...trailingIcon}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default SectionNoticeButton;
|