This repository was archived by the owner on Jan 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Links #70
Open
VinaiRachakonda
wants to merge
11
commits into
master
Choose a base branch
from
links
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Links #70
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7236a9e
Apply links patch
1991577
Now add all files lol
185509e
Fix errors in refmap and test the company links generation functionality
ba9baaa
UI
albertzhidong 513f51c
Update client/schemas/gdrive.ts
casey-chow c523ca2
Update client/components/CompanyProfile/LinksViewer/LinksViewerDispla…
casey-chow 2a6c663
% and hover
albertzhidong d8a9369
address pr concerns
casey-chow ac4513b
de-slug names for company links
casey-chow 28bc3d5
synchronize upload process
casey-chow d32eb4c
Merge branch 'master' into links
casey-chow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import React, { Component } from 'react'; | ||
import Dropdown from 'react-bootstrap/lib/Dropdown'; | ||
import styled from 'styled-components'; | ||
import DropdownItem from 'react-bootstrap/lib/DropdownItem'; | ||
import { CompanyLink } from '../../schemas/company'; | ||
import { DocumentTypes } from '../../schemas/gdrive'; | ||
|
||
const StyledDropdown = styled(Dropdown)` | ||
border: none; | ||
|
||
button { | ||
casey-chow marked this conversation as resolved.
Show resolved
Hide resolved
|
||
border: 2px solid #dadde0; | ||
width: auto; | ||
background-color: white; | ||
color: #1c37c5; | ||
padding: 0.4% 0.9% 0.5% 0.9%; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background-color: #1c37c5; | ||
color: white; | ||
border: 2px solid #1c37c5; | ||
} | ||
} | ||
|
||
div { | ||
casey-chow marked this conversation as resolved.
Show resolved
Hide resolved
|
||
width: auto; | ||
padding: 0; | ||
margin: 0; | ||
|
||
a { | ||
background-color: white; | ||
color: #1c37c5; | ||
padding: 4% 5% 3% 5%; | ||
cursor: pointer; | ||
font-size: 0.9rem; | ||
|
||
&:hover { | ||
background-color: #1c37c5; | ||
color: white; | ||
|
||
a { | ||
background-color: #1c37c5; | ||
color: white; | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
interface AttachmentDropdownProps { | ||
links: CompanyLink[]; | ||
} | ||
|
||
export default ({ links = [] }: AttachmentDropdownProps) => ( | ||
<div> | ||
<StyledDropdown> | ||
<Dropdown.Toggle variant="secondary" id="dropdown-basic" size="sm"> | ||
Attachments | ||
</Dropdown.Toggle> | ||
|
||
<Dropdown.Menu> | ||
{links.map(({ name, url }) => | ||
Object.values(DocumentTypes).includes(name) ? ( | ||
<DropdownItem key={name}> | ||
<a href={url} target="_blank" rel="noopener noreferrer"> | ||
casey-chow marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{' '} | ||
{name}{' '} | ||
</a> | ||
</DropdownItem> | ||
) : null | ||
)} | ||
</Dropdown.Menu> | ||
</StyledDropdown> | ||
</div> | ||
); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this is a %? This may get unpredictable. @albertzhidong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah we can switch to 15vh -- will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mm still not a fan--can we move to ems? It doesn't really make sense to have the padding be a function of vertical space on screen since we scroll vertically imo