bigbuffet-rw/app/soapbox/features/ui/components/compose-button.tsx
marcin mikołajczak 3c8c8048e5 Minor improvements, add actions
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-10-06 00:01:26 +02:00

21 lines
659 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 (
<div className='mt-4'>
<Button theme='accent' icon={require('@tabler/icons/pencil-plus.svg')} block size='lg' onClick={onOpenCompose}>
<span><FormattedMessage id='navigation.compose' defaultMessage='Compose' /></span>
</Button>
</div>
);
};
export default ComposeButton;