Skip to content

Commit

Permalink
updated to add stories
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Donohue authored and Seth Donohue committed Oct 5, 2021
1 parent a5bb17a commit 9b50d9a
Showing 1 changed file with 41 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export default {
const ProgressRingTemplate = ({ paused, value }) => `
<fluent-progress-ring
${value ? `value="${value}"` : ''}
></fluent-progress-ring>
<fluent-progress-ring
${paused ? `paused="${paused}"` : ''}
></fluent-progress-ring>
`;
Expand All @@ -27,17 +25,55 @@ ProgressRing.args = {
};

const defaultExample = `
<fluent-progress-ring min="0" max="100" value="${ProgressRing.args.value}"></fluent-progress-ring>
<fluent-progress-ring value="${ProgressRing.args.value}"></fluent-progress-ring>
`;

ProgressRing.parameters = {
docs: {
source: {
code: defaultExample,
},
},
};

const ProgressRingAnimatedTemplate = ({ paused, value }) => `
<fluent-progress-ring
${paused ? `paused="${paused}"` : ''}
></fluent-progress-ring>
`;

export const ProgressRingAnimated = ProgressRingAnimatedTemplate.bind({});

ProgressRingAnimated.args = {
paused: false,
};

export const ProgressRingPaused = ProgressRingAnimatedTemplate.bind({});

ProgressRingPaused.args = {
paused: true,
};

const animatedExample = `
<fluent-progress-ring></fluent-progress-ring>
`;

ProgressRing.parameters = {
const pausedExample = `
<fluent-progress-ring paused></fluent-progress-ring>
`;

ProgressRingAnimated.parameters = {
docs: {
source: {
code: animatedExample,
},
},
};

ProgressRingPaused.parameters = {
docs: {
source: {
code: defaultExample + animatedExample,
code: pausedExample,
},
},
};

0 comments on commit 9b50d9a

Please sign in to comment.