aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/chapter_link.tsx
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-12-10 22:19:52 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-10 22:20:09 +0800
commitcc1b71651dec21205f44f27ac59840edb3e616ad (patch)
tree4015ff489b2e2e30be50a6bf1205e83360916f91 /packages/website/ts/@next/components/chapter_link.tsx
parent5e1892f3834133ea87bf284ad1c491eb5a65901f (diff)
downloaddexon-sol-tools-cc1b71651dec21205f44f27ac59840edb3e616ad.tar.gz
dexon-sol-tools-cc1b71651dec21205f44f27ac59840edb3e616ad.tar.zst
dexon-sol-tools-cc1b71651dec21205f44f27ac59840edb3e616ad.zip
Add active styling to chapter link
Diffstat (limited to 'packages/website/ts/@next/components/chapter_link.tsx')
-rw-r--r--packages/website/ts/@next/components/chapter_link.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/website/ts/@next/components/chapter_link.tsx b/packages/website/ts/@next/components/chapter_link.tsx
new file mode 100644
index 000000000..786c76bec
--- /dev/null
+++ b/packages/website/ts/@next/components/chapter_link.tsx
@@ -0,0 +1,16 @@
+import * as React from 'react';
+import { NavLink as ReactRouterLink } from 'react-router-dom';
+import styled from 'styled-components';
+
+export const ChapterLink = styled(ReactRouterLink).attrs({
+ activeStyle: { opacity: 1 },
+})`
+ font-size: 1.222222222rem;
+ display: block;
+ opacity: 0.5;
+ margin-bottom: 1.666666667rem;
+
+ &:hover {
+ opacity: 1;
+ }
+`;