CoolFace
Datasetpublic

gradio/frontend

sourceHugging Faceupdated 23h agoView on Hugging Face
1likes442kdownloads
CellMenuButton.svelte47 linesDownload Raw Back to shared
1<script lang="ts">2	export let on_click: (event: MouseEvent) => void;3</script>4 5<button6	aria-label="Open cell menu"7	class="cell-menu-button"8	aria-haspopup="menu"9	on:click={on_click}10	on:touchstart={(event) => {11		event.preventDefault();12		const touch = event.touches[0];13		const mouseEvent = new MouseEvent("click", {14			clientX: touch.clientX,15			clientY: touch.clientY,16			bubbles: true,17			cancelable: true,18			view: window19		});20		on_click(mouseEvent);21	}}22>23	&#8942;24</button>25 26<style>27	.cell-menu-button {28		flex-shrink: 0;29		display: none;30		align-items: center;31		justify-content: center;32		background-color: var(--block-background-fill);33		border: 1px solid var(--border-color-primary);34		border-radius: var(--block-radius);35		width: var(--size-5);36		height: var(--size-5);37		min-width: var(--size-5);38		padding: 0;39		margin-right: var(--spacing-sm);40		z-index: 2;41		position: absolute;42		right: var(--size-1);43		top: 50%;44		transform: translateY(-50%);45	}46</style>47 
gradio/frontend · CoolFace