Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-new-media-content #180

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/npm-publish-beta.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Publish NPM Beta Package

on:
pull_request:
types:
- closed
push:
branches:
- master

Expand Down
7 changes: 7 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export const globalTypes = {
defaultValue: false,
control: { type: "boolean" },
},
unifyMediaContent: {
name: "Unify media content",
description: "Set IFrame to eligible media contents",
defaultValue: false,
control: { type: "boolean" },
},
};

const options = {
Expand All @@ -67,6 +73,7 @@ const options = {
wizardStepButtons: true,
enableForwardSkip: true,
startingStep: 1,
unifyMediaContent: true,
debugMode: false,
users: [
{ id: "http://fel.cvut.cz/people/max-chopart", label: "Max Chopart" },
Expand Down
176 changes: 168 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"prop-types": "^15.7.2",
"react-bootstrap": "1.0.1",
"react-datepicker": "^4.2.1",
"react-image-zooom": "^1.0.4",
"react-intl": "^5.24.6",
"react-loader-spinner": "^5.1.0",
"react-select": "^3.1.0",
Expand Down
12 changes: 11 additions & 1 deletion src/components/LinkIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ExternalLink from "../styles/icons/ExternalLink";
import IconOverlay from "./IconOverlay";

const LinkIcon = (props) => {
return (
return props.showOverlay ? (
<IconOverlay
tooltipContent={props.url["@id"] || props.url}
id="url-tooltip"
Expand All @@ -18,6 +18,14 @@ const LinkIcon = (props) => {
<ExternalLink className={props.iconClass} />
</a>
</IconOverlay>
) : (
<a
href={props.url["@id"] || props.url}
target="_blank"
className={props.iconClassContainer}
>
<ExternalLink className={props.iconClass} />
</a>
);
};

Expand All @@ -30,12 +38,14 @@ LinkIcon.propTypes = {
iconClass: PropTypes.string,
overlayPlacement: PropTypes.string,
absolutePosition: PropTypes.bool,
showOverlay: PropTypes.bool,
};

LinkIcon.defaultProps = {
iconClassContainer: "",
iconClass: "",
absolutePosition: true,
showOverlay: true,
};

export default LinkIcon;
Loading