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.
Adds EUI to Workpad Loader (elastic#669)
* Added EUI to workpad loader * Added EuiInMemoryTable to workpad_loader * Changed workpad_create to a stateless component * Added EuiCode to update_modal and workpad_upload * Changed font color in workpad_loader * Added height to workpad_loader * Fixed workpad name. * Switched to EuiBasicTable. Added logic for column sorting * Fixed iconType issue * Changed icon in workpad create button * Changed height of workpad_loader
- Loading branch information
Showing
8 changed files
with
152 additions
and
126 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Button } from 'react-bootstrap'; | ||
import { EuiButton } from '@elastic/eui'; | ||
|
||
export class WorkpadCreate extends React.PureComponent { | ||
static propTypes = { | ||
onCreate: PropTypes.func.isRequired, | ||
}; | ||
export const WorkpadCreate = ({ createPending, onCreate }) => ( | ||
<EuiButton | ||
fill | ||
onClick={onCreate} | ||
isLoading={createPending} | ||
iconType={!createPending ? 'plusInCircle' : null} | ||
> | ||
Create Workpad | ||
</EuiButton> | ||
); | ||
|
||
state = { | ||
createPending: false, | ||
}; | ||
|
||
create = () => { | ||
this.setState({ createPending: true }); | ||
this.props.onCreate(); | ||
}; | ||
|
||
render() { | ||
const { createPending } = this.state; | ||
|
||
return ( | ||
<Button | ||
bsSize="xsmall" | ||
bsStyle="primary" | ||
onClick={this.create} | ||
disabled={createPending} | ||
className="canvas__workpad_loader--new" | ||
> | ||
{createPending && <i className="fa fa-spinner fa-pulse" />} | ||
{!createPending && <i className="fa fa-plus" />} | ||
New Workpad | ||
</Button> | ||
); | ||
} | ||
} | ||
WorkpadCreate.propTypes = { | ||
onCreate: PropTypes.func.isRequired, | ||
createPending: PropTypes.bool, | ||
}; |
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,35 +1,7 @@ | ||
.canvas__workpad_loader { | ||
height: 400px; | ||
display: flex; | ||
height: fit-content; | ||
|
||
& > div { | ||
width: 100%; | ||
} | ||
|
||
.canvas__workpad_loader--created, | ||
.canvas__workpad_loader--updated { | ||
white-space: nowrap; | ||
} | ||
|
||
.canvas__workpad_loader--delete:hover { | ||
color: $euiColorDanger; | ||
} | ||
|
||
.canvas__workpad_loader--export:hover { | ||
color: $euiColorSecondary; | ||
} | ||
|
||
.canvas__workpad_loader--workpad a { | ||
color: $euiColorEmptyShade; | ||
} | ||
|
||
.canvas__workpad_loader--controls { | ||
display: flex; | ||
flex-direction: row; | ||
margin-bottom: $euiSize; | ||
} | ||
|
||
.canvas__workpad_loader--new { | ||
margin-right: $euiSize; | ||
.canvas__workpad_loader--search { | ||
color: $euiColorDarkestShade; | ||
} | ||
} |
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