diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-12-12 20:08:52 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-12 20:08:52 +0800 |
commit | 088ca6ce7cb36b26981c719460f01f3da6e00198 (patch) | |
tree | 56ebc78d3f2a8ec2aa833e989d82756e08954e42 /packages/website/ts/@next/components | |
parent | 5df160ffb9099a0d27415a21650fa93f687ea8e3 (diff) | |
download | dexon-sol-tools-088ca6ce7cb36b26981c719460f01f3da6e00198.tar.gz dexon-sol-tools-088ca6ce7cb36b26981c719460f01f3da6e00198.tar.zst dexon-sol-tools-088ca6ce7cb36b26981c719460f01f3da6e00198.zip |
Added a bunch of types
Diffstat (limited to 'packages/website/ts/@next/components')
4 files changed, 20 insertions, 3 deletions
diff --git a/packages/website/ts/@next/components/button.tsx b/packages/website/ts/@next/components/button.tsx index eaaf60336..db6c5d5c2 100644 --- a/packages/website/ts/@next/components/button.tsx +++ b/packages/website/ts/@next/components/button.tsx @@ -11,6 +11,7 @@ interface ButtonInterface { children?: Node | string; isTransparent?: boolean; isNoBorder?: boolean; + isCentered?: boolean; isNoPadding?: boolean; isWithArrow?: boolean; isAccentColor?: boolean; diff --git a/packages/website/ts/@next/components/header.tsx b/packages/website/ts/@next/components/header.tsx index c4f30b7b3..3d9f2055c 100644 --- a/packages/website/ts/@next/components/header.tsx +++ b/packages/website/ts/@next/components/header.tsx @@ -27,6 +27,12 @@ interface NavItem { url?: string; id?: string; text?: string; + dropdownWidth?: number; + dropdownComponent?: React.ReactNode; +} + +interface DropdownWrapInterface { + width?: number; } const mobileProductLinks = [ @@ -240,7 +246,7 @@ const LinkWrap = styled.div` } `; -const DropdownWrap = styled.div` +const DropdownWrap = styled.div<DropdownWrapInterface>` width: ${props => props.width || 280}px; padding: 15px 0; border: 1px solid transparent; diff --git a/packages/website/ts/@next/components/layout.tsx b/packages/website/ts/@next/components/layout.tsx index bba21d593..ce15bd2b3 100644 --- a/packages/website/ts/@next/components/layout.tsx +++ b/packages/website/ts/@next/components/layout.tsx @@ -33,6 +33,7 @@ interface WrapProps extends PaddingInterface { interface ColumnProps { colWidth?: '1/4' | '1/3' | '1/2' | '2/3'; isNoPadding?: boolean; + isNoMargin?: boolean; isPadLarge?: boolean; isFlexGrow?: boolean; isMobileCentered?: boolean; @@ -44,6 +45,10 @@ interface GetColWidthArgs { columns: number; } +export interface WrapStickyInterface { + offsetTop?: string; +} + const _getColumnWidth = (args: GetColWidthArgs): string => { const { span = 1, columns } = args; const percentWidth = (span / columns) * 100; @@ -126,7 +131,7 @@ export const WrapCentered = styled(WrapBase)` text-align: center; `; -export const WrapSticky = styled.div` +export const WrapSticky = styled.div<WrapStickyInterface>` position: sticky; top: ${props => props.offsetTop || '60px'}; `; diff --git a/packages/website/ts/@next/components/sections/landing/clients.tsx b/packages/website/ts/@next/components/sections/landing/clients.tsx index 68d5e384d..a858f0c34 100644 --- a/packages/website/ts/@next/components/sections/landing/clients.tsx +++ b/packages/website/ts/@next/components/sections/landing/clients.tsx @@ -7,6 +7,11 @@ import {Heading, Paragraph} from 'ts/@next/components/text'; interface ProjectLogo { name: string; imageUrl?: string; + persistOnMobile?: boolean; +} + +interface StyledProjectInterface { + isOnMobile?: boolean; } const projects: ProjectLogo[] = [ @@ -74,7 +79,7 @@ export const SectionLandingClients = () => ( </Section> ); -const StyledProject = styled.div` +const StyledProject = styled.div<StyledProjectInterface>` flex-shrink: 0; img { |