-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,251 additions
and
132 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
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 |
---|---|---|
@@ -1,74 +1,100 @@ | ||
import React from 'react'; | ||
import React, { Component } from 'react'; | ||
|
||
import { | ||
EuiButton, | ||
EuiButtonEmpty, | ||
EuiButtonIcon, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiButtonToggle, | ||
} from '../../../../src/components'; | ||
|
||
export default () => ( | ||
<EuiFlexGroup gutterSize="s" alignItems="center" className="guideDemo__ghostBackground"> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
color="ghost" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Primary | ||
</EuiButton> | ||
</EuiFlexItem> | ||
export default class extends Component { | ||
constructor(props) { | ||
super(props); | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
fill | ||
color="ghost" | ||
size="s" | ||
iconType="check" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Filled | ||
</EuiButton> | ||
</EuiFlexItem> | ||
this.state = { | ||
toggle0On: false, | ||
}; | ||
} | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButtonEmpty | ||
size="s" | ||
color="ghost" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
onToggle0Change = (e) => { | ||
this.setState({ toggle0On: e.target.checked }); | ||
} | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButtonIcon | ||
size="s" | ||
color="ghost" | ||
iconType="user" | ||
onClick={() => window.alert('Button clicked')} | ||
aria-label="Your account" | ||
/> | ||
</EuiFlexItem> | ||
render() { | ||
return ( | ||
<EuiFlexGroup wrap gutterSize="s" alignItems="center" className="guideDemo__ghostBackground"> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
color="ghost" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Primary | ||
</EuiButton> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
color="ghost" | ||
isLoading | ||
fill | ||
size="s" | ||
> | ||
Loading… | ||
</EuiButton> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
fill | ||
color="ghost" | ||
size="s" | ||
iconType="check" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
Filled | ||
</EuiButton> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
color="ghost" | ||
isLoading | ||
> | ||
Loading… | ||
</EuiButton> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
<EuiFlexItem grow={false}> | ||
<EuiButtonEmpty | ||
size="s" | ||
color="ghost" | ||
onClick={() => window.alert('Button clicked')} | ||
> | ||
small | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButtonIcon | ||
size="s" | ||
color="ghost" | ||
iconType="user" | ||
onClick={() => window.alert('Button clicked')} | ||
aria-label="Your account" | ||
/> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
color="ghost" | ||
isLoading | ||
fill | ||
size="s" | ||
> | ||
Loading… | ||
</EuiButton> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButton | ||
color="ghost" | ||
isLoading | ||
> | ||
Loading… | ||
</EuiButton> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButtonToggle | ||
color="ghost" | ||
label="Toggle Me" | ||
fill={this.state.toggle0On} | ||
onChange={this.onToggle0Change} | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
} | ||
} |
Oops, something went wrong.