Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
39c10987
Commit
39c10987
authored
Mar 10, 2022
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Mar 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert `ShareLinks` to tailwind
parent
5472f723
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
43 deletions
+10
-43
ShareAnnotationsPanel.js
src/sidebar/components/ShareAnnotationsPanel.js
+3
-1
ShareLinks.js
src/sidebar/components/ShareLinks.js
+7
-7
molecules.scss
src/styles/mixins/molecules.scss
+0
-20
AnnotationShareControl.scss
src/styles/sidebar/components/AnnotationShareControl.scss
+0
-4
ShareLinks.scss
src/styles/sidebar/components/ShareLinks.scss
+0
-10
_index.scss
src/styles/sidebar/components/_index.scss
+0
-1
No files found.
src/sidebar/components/ShareAnnotationsPanel.js
View file @
39c10987
...
@@ -112,7 +112,9 @@ function ShareAnnotationsPanel({ toastMessenger }) {
...
@@ -112,7 +112,9 @@ function ShareAnnotationsPanel({ toastMessenger }) {
)
annotations
are
only
visible
to
you
.
)
annotations
are
only
visible
to
you
.
<
/span
>
<
/span
>
<
/p
>
<
/p
>
<
div
className
=
"text-[24px]"
>
<
ShareLinks
shareURI
=
{
shareURI
}
/
>
<
ShareLinks
shareURI
=
{
shareURI
}
/
>
<
/div
>
<
/
>
<
/
>
)
:
(
)
:
(
<
p
data
-
testid
=
"no-sharing"
>
<
p
data
-
testid
=
"no-sharing"
>
...
...
src/sidebar/components/ShareLinks.js
View file @
39c10987
import
{
Icon
}
from
'@hypothesis/frontend-shared'
;
import
{
Icon
,
Link
}
from
'@hypothesis/frontend-shared'
;
/**
/**
* @typedef ShareLinkProps
* @typedef ShareLinkProps
...
@@ -14,16 +14,16 @@ import { Icon } from '@hypothesis/frontend-shared';
...
@@ -14,16 +14,16 @@ import { Icon } from '@hypothesis/frontend-shared';
*/
*/
function
ShareLink
({
label
,
iconName
,
uri
})
{
function
ShareLink
({
label
,
iconName
,
uri
})
{
return
(
return
(
<
li
className
=
"ShareLinks__link"
>
<
li
>
<
a
<
Link
aria
-
label
=
{
label
}
aria
-
label
=
{
label
}
classes
=
"text-grey-6 hover:text-color-text block"
href
=
{
uri
}
href
=
{
uri
}
title
=
{
label
}
title
=
{
label
}
target
=
"_blank"
target
=
"_blank"
rel
=
"noopener noreferrer"
>
>
<
Icon
name
=
{
iconName
}
classes
=
"ShareLinks__icon"
/>
<
Icon
name
=
{
iconName
}
/
>
<
/
a
>
<
/
Link
>
<
/li
>
<
/li
>
);
);
}
}
...
@@ -42,7 +42,7 @@ function ShareLinks({ shareURI }) {
...
@@ -42,7 +42,7 @@ function ShareLinks({ shareURI }) {
const
encodedURI
=
encodeURIComponent
(
shareURI
);
const
encodedURI
=
encodeURIComponent
(
shareURI
);
return
(
return
(
<
ul
className
=
"
ShareLinks
"
>
<
ul
className
=
"
flex flex-row gap-x-4 items-center justify-center border-t pt-2
"
>
<
ShareLink
<
ShareLink
iconName
=
"twitter"
iconName
=
"twitter"
label
=
"Tweet share link"
label
=
"Tweet share link"
...
...
src/styles/mixins/molecules.scss
View file @
39c10987
...
@@ -46,26 +46,6 @@
...
@@ -46,26 +46,6 @@
}
}
}
}
/**
* horizontally-oriented collection of linked icons
*/
@mixin
footer-links
{
@include
layout
.
row
(
center
);
@include
utils
.
border--top
;
padding-top
:
8px
;
&
__icon
{
@include
layout
.
row
;
@include
utils
.
icon--medium
;
margin
:
0
8px
;
color
:
var
.
$grey-5
;
&
:hover
{
color
:
var
.
$grey-6
;
}
}
}
/**
/**
* A pattern for styling a little "pointer" (arrow) icon that attaches to
* A pattern for styling a little "pointer" (arrow) icon that attaches to
* menu content and serves as a visual anchor back to the triggering
* menu content and serves as a visual anchor back to the triggering
...
...
src/styles/sidebar/components/AnnotationShareControl.scss
View file @
39c10987
...
@@ -52,8 +52,4 @@
...
@@ -52,8 +52,4 @@
right
:
0px
;
right
:
0px
;
bottom
:
-12px
;
bottom
:
-12px
;
}
}
.ShareLinks__icon
{
@include
utils
.
icon--medium
;
}
}
}
src/styles/sidebar/components/ShareLinks.scss
deleted
100644 → 0
View file @
5472f723
@use
'../../mixins/utils'
;
@use
'../../mixins/molecules'
;
.ShareLinks
{
@include
molecules
.
footer-links
;
&
__icon
{
@include
utils
.
icon--large
;
}
}
src/styles/sidebar/components/_index.scss
View file @
39c10987
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
@use
'./PaginationNavigation'
;
@use
'./PaginationNavigation'
;
@use
'./SelectionTabs'
;
@use
'./SelectionTabs'
;
@use
'./SearchInput'
;
@use
'./SearchInput'
;
@use
'./ShareLinks'
;
@use
'./TagEditor'
;
@use
'./TagEditor'
;
@use
'./TagList'
;
@use
'./TagList'
;
@use
'./Thread'
;
@use
'./Thread'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment