Skip to content

ShareButton

공유 버튼 컴포넌트입니다.

Astro

---
import ShareButton from "@shared/ui/share-button/ShareButton.astro";
---
<ShareButton />
<ShareButton shareLayer="shareLayerId" />

Props:

  • shareLayer?: string: 공유 레이어 ID. 지정 시 클릭하면 해당 레이어를 열도록 commandcommandfor 속성이 추가됩니다.

Code

<button type="button" class="v-button v-share-button" title="공유하기">
<svg viewBox="0 0 16 16" class="v-icon v-icon_share">
<path stroke="currentColor" d="m4 8.5 8-5M12 13.5l-8-5"></path>
<circle cx="4" cy="8.5" r="2" fill="#fff" stroke="currentColor"></circle>
<circle cx="12" cy="3.5" r="2" fill="#fff" stroke="currentColor"></circle>
<circle cx="12" cy="13.5" r="2" fill="#fff" stroke="currentColor"></circle>
</svg>
</button>
<!-- 레이어 연결 -->
<button type="button" class="v-button v-share-button" title="공유하기" command="showModal" commandfor="shareLayerId">
<!-- SVG -->
</button>

Preview