Skip to content

Commit

Permalink
fix: add DEFAULT_LINK_SHOW_BUTTON constant (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Apr 14, 2023
1 parent 9b9ef52 commit e0a3762
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ export const GRAASP_ASSETS_PROTOCOL = 'https://';
export const SCREEN_MAX_HEIGHT = window.innerHeight * 0.8;

export const FAVORITE_COLOR = '#ffc107';

export const DEFAULT_LINK_SHOW_BUTTON = true;
4 changes: 2 additions & 2 deletions src/items/LinkItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { EmbeddedLinkItemTypeRecord, MemberRecord } from '@graasp/sdk/frontend';

import withCollapse from '../Collapse/withCollapse';
import Button from '../buttons/Button';
import { ITEM_MAX_HEIGHT } from '../constants';
import { DEFAULT_LINK_SHOW_BUTTON, ITEM_MAX_HEIGHT } from '../constants';
import withCaption from './withCaption';
import withResizing, { StyledIFrame } from './withResizing';

Expand Down Expand Up @@ -83,7 +83,7 @@ const LinkItem: FC<LinkItemProps> = ({
editCaption = false,
showCaption = true,
showIframe = false,
showButton = true,
showButton = DEFAULT_LINK_SHOW_BUTTON,
loadingMessage = 'Link is Loading...',
openLinkMessage = 'Click here to open the link manually',
height: defaultHeight = 400,
Expand Down

0 comments on commit e0a3762

Please sign in to comment.