forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI Framework] [K7]: Buttons and loader components (elastic#13269)
K7 buttons and loaders components.
- Loading branch information
Showing
33 changed files
with
1,633 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
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,208 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
KuiButton, | ||
} from '../../../../components/'; | ||
|
||
export default () => ( | ||
<div> | ||
<KuiButton | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Default | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Filled | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
size="small" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
size="small" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small and filled | ||
</KuiButton> | ||
|
||
<br/><br/> | ||
|
||
<KuiButton | ||
type="secondary" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Secondary | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="secondary" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Filled | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="secondary" | ||
size="small" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="secondary" | ||
size="small" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small and filled | ||
</KuiButton> | ||
|
||
<br/><br/> | ||
|
||
<KuiButton | ||
type="warning" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Warning | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="warning" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Filled | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="warning" | ||
size="small" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="warning" | ||
size="small" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small and filled | ||
</KuiButton> | ||
|
||
<br/><br/> | ||
|
||
<KuiButton | ||
type="danger" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Danger | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="danger" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Filled | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="danger" | ||
size="small" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
type="danger" | ||
size="small" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small and filled | ||
</KuiButton> | ||
|
||
<br/><br/> | ||
|
||
<KuiButton | ||
disabled | ||
type="disabled" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Disabled | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
disabled | ||
type="disabled" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Filled | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
disabled | ||
type="disabled" | ||
size="small" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small | ||
</KuiButton> | ||
|
||
| ||
|
||
<KuiButton | ||
disabled | ||
type="disabled" | ||
size="small" | ||
fill | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small and filled | ||
</KuiButton> | ||
|
||
</div> | ||
); |
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,63 @@ | ||
import React from 'react'; | ||
|
||
import { renderToHtml } from '../../services'; | ||
|
||
import { | ||
GuideCode, | ||
GuideDemo, | ||
GuidePage, | ||
GuideSection, | ||
GuideSectionTypes, | ||
GuideText, | ||
} from '../../components'; | ||
|
||
import Button from './button'; | ||
const buttonSource = require('!!raw!./button'); | ||
const buttonHtml = renderToHtml(Button); | ||
|
||
import ButtonWithIcon from './button_with_icon'; | ||
const buttonWithIconSource = require('!!raw!./button_with_icon'); | ||
const buttonWithIconHtml = renderToHtml(Button); | ||
|
||
export default props => ( | ||
<GuidePage title={props.route.name}> | ||
<GuideSection | ||
title="Button" | ||
source={[{ | ||
type: GuideSectionTypes.JS, | ||
code: buttonSource, | ||
}, { | ||
type: GuideSectionTypes.HTML, | ||
code: buttonHtml, | ||
}]} | ||
> | ||
<GuideText> | ||
Button <GuideCode>type</GuideCode> defines the color of the button. | ||
<GuideCode>fill</GuideCode> can be optionally added to add more focus to an action. | ||
</GuideText> | ||
|
||
<GuideDemo> | ||
<Button /> | ||
</GuideDemo> | ||
</GuideSection> | ||
<GuideSection | ||
title="Button with Icon" | ||
source={[{ | ||
type: GuideSectionTypes.JS, | ||
code: buttonWithIconSource, | ||
}, { | ||
type: GuideSectionTypes.HTML, | ||
code: buttonWithIconHtml, | ||
}]} | ||
> | ||
<GuideText> | ||
The passed icon needs to come from our list of svg icons. Can be flipped | ||
to the other side by passing <GuideCode>iconReverse</GuideCode>. | ||
</GuideText> | ||
|
||
<GuideDemo> | ||
<ButtonWithIcon /> | ||
</GuideDemo> | ||
</GuideSection> | ||
</GuidePage> | ||
); |
Oops, something went wrong.