JSFiddle - React, Tailwind, and code Playground

JavaScript

const { InspectorControls, RichText } = wp.blockEditor;
const { registerBlockType } = wp.blocks;
const { __experimentalInputControl: InputControl } = wp.components;
const { Fragment } = wp.element;

registerBlockType('my-blocks/test', {
	title: 'Test',
	description: 'Test Block',
	attributes: {
		url: {
			type: 'string',
			source: 'attribute',
			selector: 'a',
			attribute: 'href',
		},
		text: {
			type: 'string',
			default: '',
		},
	},

	edit(props) {
		const { attributes, className, setAttributes } = props;
		const { url, text } = attributes;

		return (
			<Fragment>
				<InspectorControls>
					<InputControl label="URL" value={url} onChange={url => setAttributes({ url })} />
				</InspectorControls>
				<RichText
					tagName="div"
					className={className}
					value={text}
					placeholder="Link text"
					onChange={text => setAttributes({ text })}
				/>
			</Fragment>
		);
	},

	save(props) {
		const {
			attributes: { url, text },
		} = props;

		return <a href={url}>{text}</a>;
	},
});