From c0157156b52da927829f5731a726490dda4598bb Mon Sep 17 00:00:00 2001 From: Adam Matthiesen Date: Sat, 21 Dec 2024 23:42:04 -0800 Subject: [PATCH] Refactor FrameButton component to update close button styling --- .../studiocms_dashboard/src/components/FrameButton.astro | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/studiocms_dashboard/src/components/FrameButton.astro b/packages/studiocms_dashboard/src/components/FrameButton.astro index bbd4219d5..20f2c9a3f 100644 --- a/packages/studiocms_dashboard/src/components/FrameButton.astro +++ b/packages/studiocms_dashboard/src/components/FrameButton.astro @@ -36,7 +36,7 @@ const { link } = Astro.props; frameContainer.style.borderRadius = '1rem'; const frameButton = document.createElement('button'); - frameButton.textContent = 'Close'; + frameButton.innerHTML = ''; frameButton.style.position = 'absolute'; frameButton.style.top = '1rem'; frameButton.style.right = '1rem'; @@ -46,6 +46,11 @@ const { link } = Astro.props; frameButton.style.border = 'none'; frameButton.style.cursor = 'pointer'; frameButton.style.borderRadius = '0.5rem'; + frameButton.style.height = '2.5rem'; + frameButton.style.width = '2.5rem'; + frameButton.style.display = 'flex'; + frameButton.style.justifyContent = 'center'; + frameButton.style.alignItems = 'center'; frameButton.addEventListener('click', () => { frameContainer.style.display = 'none';