superdesk/superdesk-client-core

View on GitHub
scripts/apps/relations/directives/related-items-create-new-button.tsx

Summary

Maintainability
A
0 mins
Test Coverage

import React from 'react';
import {Button} from 'superdesk-ui-framework/react';
import {IPropsAddContentCustomButton} from 'core/ui/components/content-create-dropdown/content-create-dropdown';
import {gettext} from 'core/utils';

export class RelatedItemCreateNewButton extends React.PureComponent<IPropsAddContentCustomButton> {
    render() {
        return (
            <Button
                text={gettext('Create new')}
                icon="plus-sign"
                type="primary"
                onClick={(event) => {
                    this.props.onClick(event);
                }}
                size="small"
                style="hollow"
            />
        );
    }
}