-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
button component reworked; added example story with documentation + i…
…mage
- Loading branch information
verena-ifx
authored and
verena-ifx
committed
Jun 23, 2023
1 parent
8979738
commit 712ca3d
Showing
13 changed files
with
243 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
...onents/src/components/template-story-with-markdown/Custom-MDX-Documentation.mdx
This file was deleted.
Oops, something went wrong.
88 changes: 0 additions & 88 deletions
88
packages/components/src/components/template-story-with-markdown/button.tsx
This file was deleted.
Oops, something went wrong.
File renamed without changes.
71 changes: 71 additions & 0 deletions
71
packages/components/src/components/template-story-with-markdown/example.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
import ExampleDocumentation from './example_docs.mdx'; | ||
|
||
export default { | ||
title: "Components/DocumentedExample", | ||
|
||
parameters: { | ||
docs: { | ||
page: ExampleDocumentation, | ||
canvas: { sourceState: 'shown' }, | ||
}, | ||
}, | ||
args: { | ||
label: "Button", | ||
variant: "solid", | ||
color: "primary", | ||
type: "button", | ||
size: "m", | ||
disabled: false, | ||
icon: "", | ||
position: 'left', | ||
href: "", | ||
target: '_blank' | ||
}, | ||
|
||
argTypes: { | ||
variant: { | ||
options: ['solid', 'outline', 'outline-text'], | ||
control: { type: 'radio' }, | ||
}, | ||
color: { | ||
options: ['primary', 'secondary', 'success', 'danger', 'warning'], | ||
control: { type: 'radio' }, | ||
}, | ||
type: { | ||
options: ['submit', 'button', 'reset'], | ||
control: { type: 'radio' }, | ||
}, | ||
size: { | ||
options: ['s', 'm'], | ||
control: { type: 'radio' }, | ||
}, | ||
position: { | ||
options: ['left', 'right'], | ||
control: { type: 'radio' } | ||
}, | ||
target: { | ||
options: ['_blank', '_self', '_parent'], | ||
control: { type: 'radio' } | ||
} | ||
|
||
}, | ||
|
||
}; | ||
|
||
|
||
const DefaultTemplate = (args) => | ||
`<ifx-example type="${args.type}" variant="${args.variant}" icon="${args.icon}" position="${args.position}" href="${args.href}" target="${args.target}" color="${args.color}" size="${args.size}" disabled="${args.disabled}"> | ||
${args.label} | ||
</ifx-example>`; | ||
|
||
|
||
export const Primary = DefaultTemplate.bind({}); | ||
|
||
export const Secondary = DefaultTemplate.bind({}); | ||
Secondary.args = { | ||
color: 'secondary' | ||
}; | ||
|
||
|
||
|
Oops, something went wrong.