Skip to content

Commit

Permalink
feat(homepage): simple-pie examples layout
Browse files Browse the repository at this point in the history
  • Loading branch information
serjilyashenko committed Sep 23, 2024
1 parent 9378ce6 commit 7314f5b
Showing 1 changed file with 44 additions and 46 deletions.
90 changes: 44 additions & 46 deletions apps/homepage/src/components/SimplePieCases.mdx
Original file line number Diff line number Diff line change
@@ -1,51 +1,49 @@
---
---
import { Card, CardGrid } from '@astrojs/starlight/components';
import { Card } from '@astrojs/starlight/components';

import './PieScript.astro';

<CardGrid>
<Card>
<div class="pie"
data-pie={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({})}
></div>
```js
simplePie([2, 1, 1, 2])
```
</Card>
<Card>
<div class="pie"
data-pie={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({ borderColor: "transparent" })}
></div>
```js
simplePie([2, 1, 1, 2], {
borderColor: "transparent"
})
```
</Card>
<Card>
<div class="pie"
data-doughnut={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({ borderWidth: 3 })}
></div>
```js
simpleDoughnut([2, 1, 1, 2], {
borderWidth: 3
})
```
</Card>
<Card>
<div class="pie"
data-doughnut={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({ borderColor: "transparent", inner: 0.3 })}
></div>
```js
simpleDoughnut([2, 1, 1, 2], {
borderColor: "transparent",
inner: 0.3,
})
```
</Card>
</CardGrid>
<Card>
<div class="pie"
data-pie={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({})}
></div>
```js
simplePie([2, 1, 1, 2])
```
</Card>
<Card>
<div class="pie"
data-pie={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({ borderColor: "transparent" })}
></div>
```js
simplePie([2, 1, 1, 2], {
borderColor: "transparent"
})
```
</Card>
<Card>
<div class="pie"
data-doughnut={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({ borderWidth: 3 })}
></div>
```js
simpleDoughnut([2, 1, 1, 2], {
borderWidth: 3
})
```
</Card>
<Card>
<div class="pie"
data-doughnut={JSON.stringify([2, 1, 1, 2])}
data-options={JSON.stringify({ borderColor: "transparent", inner: 0.3 })}
></div>
```js
simpleDoughnut([2, 1, 1, 2], {
borderColor: "transparent",
inner: 0.3,
})
```
</Card>

0 comments on commit 7314f5b

Please sign in to comment.