-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
42 deletions.
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 |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import styled from "styled-components"; | ||
|
||
export const TextLink = styled.a.attrs({ target: '_blank' })` | ||
cursor: pointer; | ||
text-decoration: underline; | ||
export const TextLink = styled.a.attrs({ target: "_blank" })` | ||
cursor: pointer; | ||
text-decoration: underline; | ||
&.link1 { | ||
color: var(--primary-color); | ||
text-decoration-color: var(--primary-color); | ||
} | ||
&.link2 { | ||
color: var(--primary-color3); | ||
text-decoration-color: var(--primary-color3); | ||
} | ||
` | ||
&.link1 { | ||
color: var(--primary-color); | ||
text-decoration-color: var(--primary-color); | ||
} | ||
&.link2 { | ||
color: var(--primary-color3); | ||
text-decoration-color: var(--primary-color3); | ||
} | ||
`; | ||
|
||
const subscanAttrs = (p: { account: string }) => ({ target: '_blank', href: `https://crust.subscan.io/account/${p.account}` }) | ||
export const SubscanAddress = styled.a.attrs(subscanAttrs) <{ account: string }>` | ||
cursor: pointer; | ||
color: inherit !important; | ||
` | ||
const subscanAttrs = (p: { account: string }) => ({ target: "_blank", href: `https://crust.subscan.io/account/${p.account}` }); | ||
export const SubscanAddress = styled.a.attrs<{ account: string }>(subscanAttrs)<{ account: string }>` | ||
cursor: pointer; | ||
color: inherit !important; | ||
`; | ||
|
||
const subscanBlockAttrs = (p: { block: number | string }) => ({ target: '_blank', href: `https://crust.subscan.io/block/${p.block}` }) | ||
export const SubscanBlock = styled.a.attrs(subscanBlockAttrs) <{ block: number | string }>` | ||
cursor: pointer; | ||
color: inherit !important; | ||
text-decoration: underline; | ||
` | ||
const subscanBlockAttrs = (p: { block: number | string }) => ({ target: "_blank", href: `https://crust.subscan.io/block/${p.block}` }); | ||
export const SubscanBlock = styled.a.attrs<{ block: number | string }>(subscanBlockAttrs)<{ block: number | string }>` | ||
cursor: pointer; | ||
color: inherit !important; | ||
text-decoration: underline; | ||
`; | ||
|
||
const subscanHashAttrs = (p: { hash: string }) => ({ target: '_blank', href: `https://crust.subscan.io/extrinsic/${p.hash}` }) | ||
export const SubscanHash = styled.a.attrs(subscanHashAttrs) <{ hash: string }>` | ||
cursor: pointer; | ||
color: inherit !important; | ||
` | ||
const subscanHashAttrs = (p: { hash: string }) => ({ target: "_blank", href: `https://crust.subscan.io/extrinsic/${p.hash}` }); | ||
export const SubscanHash = styled.a.attrs<{ hash: string }>(subscanHashAttrs)<{ hash: string }>` | ||
cursor: pointer; | ||
color: inherit !important; | ||
`; |
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 |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import styled from "styled-components"; | ||
|
||
export type Colors = | ||
'--primary-color' | | ||
'--primary-color2' | | ||
'--primary-color3' | | ||
'--primary-color4' | ||
export type Colors = "--primary-color" | "--primary-color2" | "--primary-color3" | "--primary-color4"; | ||
|
||
export const ColorSpan = styled.span.attrs((p: { color?: Colors }) => ({ color: p.color || '--primary-color' }))` | ||
color: var(${prop => prop.color}); | ||
&.btn { | ||
cursor: pointer; | ||
&:disabled{ | ||
cursor: not-allowed; | ||
} | ||
export const ColorSpan = styled.span.attrs<{ color?: Colors }>((p: { color?: Colors }) => ({ color: p.color || "--primary-color" }))` | ||
color: var(${(prop) => prop.color}); | ||
&.btn { | ||
cursor: pointer; | ||
&:disabled { | ||
cursor: not-allowed; | ||
} | ||
` | ||
} | ||
`; |