Skip to content

Commit

Permalink
fix broken examples for action trigger. clean up test glyph (microsof…
Browse files Browse the repository at this point in the history
  • Loading branch information
scomea authored Dec 10, 2018
1 parent 67808b1 commit 9bd324c
Showing 1 changed file with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ import { ComponentFactoryExample } from "@microsoft/fast-development-site-react"

const testDestination: string = "https://www.microsoft.com/en-us/";

const testGlyph: any = (classname: string): React.ReactNode => {
return (
<svg
className={classname}
width="7"
height="12"
viewBox="0 0 7 12"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M0.0175781 11.4551L5.4668 6L0.0175781 0.544922L0.544922 0.0175781L6.5332 6L0.544922 11.9824L0.0175781 11.4551Z" />
</svg>
);
};

export default {
name: "Action trigger",
component: ActionTrigger,
Expand All @@ -15,46 +29,35 @@ export default {
children: "Action Trigger",
appearance: ActionTriggerAppearance.primary,
href: testDestination,
glyph: (classname: string): React.ReactNode => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="-4014.4 1616.998 4.4 8"
className={classname}
>
<g transform="translate(-4128 1600.698)">
<path
d="M140.6,23.9l3.7-3.6-3.7-3.6.4-.4,4,4-4,4Z"
transform="translate(-27)"
/>
</g>
</svg>
);
},
glyph: testGlyph,
},
data: [
{
appearance: ActionTriggerAppearance.primary,
children: "Primary action trigger",
href: testDestination,
glyph: testGlyph,
"data-sketch-symbol": "Action trigger - primary",
} as any,
{
appearance: ActionTriggerAppearance.lightweight,
children: "Lightweight action trigger",
href: testDestination,
glyph: testGlyph,
"data-sketch-symbol": "Action trigger - lightweight",
},
{
appearance: ActionTriggerAppearance.justified,
children: "Justified action trigger",
href: testDestination,
glyph: testGlyph,
"data-sketch-symbol": "Action trigger - justified",
},
{
appearance: ActionTriggerAppearance.outline,
children: "Outlined action trigger",
href: testDestination,
glyph: testGlyph,
"data-sketch-symbol": "Action trigger - outlined",
},
],
Expand Down

0 comments on commit 9bd324c

Please sign in to comment.