bigbuffet-rw/app/soapbox/features/ui/components/compose-button.tsx

25 lines
637 B
TypeScript

import React from 'react';
import { FormattedMessage } from 'react-intl';
import { useDispatch } from 'react-redux';
import { openModal } from 'soapbox/actions/modals';
import { Button } from 'soapbox/components/ui';
const ComposeButton = () => {
const dispatch = useDispatch();
const onOpenCompose = () => dispatch(openModal('COMPOSE'));
return (
<Button
theme='accent'
icon={require('@tabler/icons/pencil-plus.svg')}
size='lg'
onClick={onOpenCompose}
block
>
<FormattedMessage id='navigation.compose' defaultMessage='Compose' />
</Button>
);
};
export default ComposeButton;