Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
XueMoMo committed Oct 17, 2024
1 parent fd29cc2 commit e661a90
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 42 deletions.
2 changes: 1 addition & 1 deletion components/OnDrapDropFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function _OnDrapDropFrame(p: Props) {
);
}

export const OnDrapDropFrame = React.memo<Props>(styled(_OnDrapDropFrame)`
export const OnDrapDropFrame = React.memo<Props>(styled(_OnDrapDropFrame as any)`
position: fixed;
width: 100vw;
height: 100vh;
Expand Down
56 changes: 28 additions & 28 deletions components/texts/links.ts
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;
`;
22 changes: 9 additions & 13 deletions components/texts/spans.ts
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;
}
`
}
`;

0 comments on commit e661a90

Please sign in to comment.