mattermost-mobile/app/components/section_notice/section_notice_button.tsx
Daniel Espino García e0992c0bf6
Add test notification tool (#8271)
* Add test notification menu

* Reduce the minimum version for testing purposes

* Address feedback

* Add missing strings

* Address feedback

* Fix snapshots

* Bump version limit and use correct link

* Fix tests

* Fix URL issues
2024-11-11 10:22:57 +01:00

35 lines
901 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, iconSize: 18} : {};
const trailingIcon = button.trailingIcon ? {iconName: button.trailingIcon, iconSize: 18} : {};
return (
<Button
onPress={button.onClick}
text={button.text}
theme={theme}
emphasis={emphasis}
{...leadingIcon}
{...trailingIcon}
/>
);
};
export default SectionNoticeButton;