mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 10:58:19 +01:00
Stickers
Co-authored-by: scott@signal.org Co-authored-by: ken@signal.org
This commit is contained in:
committed by
Scott Nonnenberg
parent
8c8856785b
commit
29de50c12a
29
ts/components/stickers/StickerPackInstallButton.tsx
Normal file
29
ts/components/stickers/StickerPackInstallButton.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { LocalizerType } from '../../types/Util';
|
||||
|
||||
export type OwnProps = {
|
||||
readonly installed: boolean;
|
||||
readonly i18n: LocalizerType;
|
||||
readonly blue?: boolean;
|
||||
};
|
||||
|
||||
export type Props = OwnProps & React.HTMLProps<HTMLButtonElement>;
|
||||
|
||||
export const StickerPackInstallButton = React.forwardRef<
|
||||
HTMLButtonElement,
|
||||
Props
|
||||
>(({ i18n, installed, blue, ...props }: Props, ref) => (
|
||||
<button
|
||||
ref={ref}
|
||||
className={classNames({
|
||||
'module-sticker-manager__install-button': true,
|
||||
'module-sticker-manager__install-button--blue': blue,
|
||||
})}
|
||||
{...props}
|
||||
>
|
||||
{installed
|
||||
? i18n('stickers--StickerManager--Uninstall')
|
||||
: i18n('stickers--StickerManager--Install')}
|
||||
</button>
|
||||
));
|
||||
Reference in New Issue
Block a user