-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding tags to exercise details and exercise lists. Adjusting appeara…
…nce of the list to make room for tags (and some refactoring).
- Loading branch information
Martin Krulis
committed
Nov 25, 2019
1 parent
f84167f
commit 2a39e0e
Showing
18 changed files
with
172 additions
and
73 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
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,35 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FormattedMessage } from 'react-intl'; | ||
import { OverlayTrigger, Tooltip } from 'react-bootstrap'; | ||
import Button from '../../widgets/FlatButton'; | ||
import { DeleteIcon } from '../../icons'; | ||
|
||
const DeleteButtonRaw = ({ id, disabled, small = true, captionAsLabel = false, ...props }) => | ||
captionAsLabel ? ( | ||
<OverlayTrigger | ||
placement="bottom" | ||
overlay={ | ||
<Tooltip id={`${id}-delete`}> | ||
<FormattedMessage id="generic.delete" defaultMessage="Delete" /> | ||
</Tooltip> | ||
}> | ||
<Button disabled={disabled || !id} bsStyle="danger" bsSize={small ? 'sm' : undefined} {...props}> | ||
<DeleteIcon smallGapLeft smallGapRight /> | ||
</Button> | ||
</OverlayTrigger> | ||
) : ( | ||
<Button disabled={disabled || !id} bsStyle="danger" bsSize={small ? 'sm' : undefined} {...props}> | ||
<DeleteIcon gapRight /> | ||
<FormattedMessage id="generic.delete" defaultMessage="Delete" /> | ||
</Button> | ||
); | ||
|
||
DeleteButtonRaw.propTypes = { | ||
id: PropTypes.string, | ||
small: PropTypes.bool, | ||
captionAsLabel: PropTypes.bool, | ||
disabled: PropTypes.bool, | ||
}; | ||
|
||
export default DeleteButtonRaw; |
Oops, something went wrong.