Skip to content

Commit 1ae4567

Browse files
authored
Merge pull request #48 from interledger/chj/add-custom-label-options
featL: add label props to MermaidWrapper and LargeImg
2 parents b4df699 + f9ce2ff commit 1ae4567

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@interledger/docs-design-system",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"type": "module",
55
"description": "Shared styles and components used across all Interledger Starlight documentation sites",
66
"exports": {

src/components/LargeImg.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
const { src, alt, hasBorder = true } = Astro.props;
2+
const { src, alt, hasBorder = true, viewLabel="View full image" } = Astro.props;
33
---
44
<div>
55
{hasBorder ? <img src={src} alt={alt} class="border" /> : <img src={src} alt={alt} />}
@@ -8,7 +8,7 @@ const { src, alt, hasBorder = true } = Astro.props;
88
target='_blank'
99
rel='noopener noreferrer'
1010
>
11-
View full image
11+
{viewLabel}
1212
</a>
1313
</div>
1414

src/components/Mermaid.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const { graph, hasBorder = false } = Astro.props;
88

99
{hasBorder ? <pre class="mermaid border" set:html={graph} /> : <pre class="mermaid" set:html={graph} />}
1010

11-
1211
<style>
1312
pre.mermaid.mermaid {
1413
background-color: transparent;

src/components/MermaidWrapper.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
const { hasBorder = true, diagramName="diagram" } = Astro.props;
2+
const { hasBorder = true, diagramName="diagram", viewLabel="View full diagram", downloadLabel="Download diagram" } = Astro.props;
33
---
44
<div>
55
{hasBorder ?
66
<div class="not-content border mermaid-wrapper"><slot /></div> :
77
<div class="not-content"><slot /></div>
88
}
99
<button data-mermaid-view class="button">
10-
<span>View full diagram</span>
10+
<span>{viewLabel}</span>
1111
</button>
1212

1313
<button data-mermaid-download={diagramName} class="button">
14-
<span>Download diagram</span>
14+
<span>{downloadLabel}</span>
1515
</button>
1616
</div>
1717

0 commit comments

Comments
 (0)