-
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.
fix(loading): updated storybook controls, mdx, default props and tests (
#12206) * fix(loading): updated storybook controls, mdx, default props and tests * fix(loading): made a playground * fix(loading): added prop to the default story Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
01a2f0f
commit 7458ce3
Showing
5 changed files
with
81 additions
and
45 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 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
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 @@ | ||
/** | ||
* 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 Loading from '.'; | ||
import mdx from './Loading.mdx'; | ||
|
||
export default { | ||
title: 'Components/Loading', | ||
component: Loading, | ||
parameters: { | ||
docs: { | ||
page: mdx, | ||
}, | ||
}, | ||
}; | ||
|
||
export const Default = () => { | ||
return <Loading className={'some-class'} withOverlay={false} />; | ||
}; | ||
|
||
export const Playground = (args) => { | ||
return <Loading className={'some-class'} {...args} />; | ||
}; | ||
|
||
Playground.argTypes = { | ||
children: { | ||
table: { | ||
disable: true, | ||
}, | ||
}, | ||
className: { | ||
table: { | ||
disable: true, | ||
}, | ||
}, | ||
// The id prop is deprecated and should be remove in the next major release | ||
id: { | ||
table: { | ||
disable: true, | ||
}, | ||
}, | ||
active: { | ||
control: { | ||
type: 'boolean', | ||
}, | ||
defaultValue: true, | ||
}, | ||
withOverlay: { | ||
control: { | ||
type: 'boolean', | ||
}, | ||
defaultValue: false, | ||
}, | ||
small: { | ||
control: { | ||
type: 'boolean', | ||
}, | ||
defaultValue: false, | ||
}, | ||
description: { | ||
control: { | ||
type: 'text', | ||
}, | ||
defaultValue: 'Loading', | ||
}, | ||
}; |