-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(link): provide playground with working controls (#11614)
* docs(link): provide playground with working controls * docs(link): clean up unused pieces Co-authored-by: Josh Black <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
1134fde
commit 76faa44
Showing
3 changed files
with
55 additions
and
71 deletions.
There are no files selected for viewing
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
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,52 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Download } from '@carbon/icons-react'; | ||
import Link from './Link'; | ||
import mdx from './Link.mdx'; | ||
|
||
export default { | ||
title: 'Components/Link', | ||
component: Link, | ||
parameters: { | ||
docs: { | ||
page: mdx, | ||
}, | ||
}, | ||
args: { | ||
disabled: false, | ||
inline: false, | ||
visited: false, | ||
}, | ||
argTypes: { | ||
children: { | ||
table: { | ||
disable: true, | ||
}, | ||
}, | ||
renderIcon: { | ||
table: { | ||
disable: true, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export const Default = () => <Link href="#">Link</Link>; | ||
|
||
export const PairedWithIcon = () => ( | ||
<Link href="#" renderIcon={Download}> | ||
Download | ||
</Link> | ||
); | ||
|
||
export const Playground = (args) => ( | ||
<Link href="#" {...args}> | ||
Link | ||
</Link> | ||
); |