diff --git a/centrifuge-app/src/components/TextLink.tsx b/centrifuge-app/src/components/TextLink.tsx index 820df816f9..b326046cd1 100644 --- a/centrifuge-app/src/components/TextLink.tsx +++ b/centrifuge-app/src/components/TextLink.tsx @@ -31,10 +31,9 @@ export const TextLink = styled.span` } } ` +export const RouterTextLink = (props: any) => +export const ButtonTextLink = (props: any) => -export const RouterTextLink = TextLink.withComponent(Link) - -export const ButtonTextLink = TextLink.withComponent('button') ButtonTextLink.defaultProps = { type: 'button', } diff --git a/fabric/src/components/Accordion/index.tsx b/fabric/src/components/Accordion/index.tsx index a54e3ee653..d44ca9edae 100644 --- a/fabric/src/components/Accordion/index.tsx +++ b/fabric/src/components/Accordion/index.tsx @@ -8,6 +8,10 @@ import { Text } from '../Text' export type AccordionProps = BoxProps & { items: { title: React.ReactNode; body: React.ReactNode }[] } +interface AccordionEntryProps extends Omit { + title: React.ReactNode + body: React.ReactNode +} const Root = styled(Box)` list-style: none; @@ -33,7 +37,6 @@ const Toggle = styled(Shelf)` export function Accordion({ items, ...boxProps }: AccordionProps) { return ( + (null) @@ -54,9 +58,9 @@ export function Banner({ children, title, ...props }: BannerProps) { style={{ marginLeft: 'auto' }} /> - + {children} - + ) : null diff --git a/fabric/src/components/Box/index.ts b/fabric/src/components/Box/index.ts index 58aa9e93b9..b4e9a53897 100644 --- a/fabric/src/components/Box/index.ts +++ b/fabric/src/components/Box/index.ts @@ -69,7 +69,6 @@ interface SystemProps PositionProps, BleedProps, AspectProps {} - // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface StyledBoxProps extends SystemProps {} diff --git a/fabric/src/components/Button/WalletButton.tsx b/fabric/src/components/Button/WalletButton.tsx index 565bbdbcc9..6dc7f69990 100644 --- a/fabric/src/components/Button/WalletButton.tsx +++ b/fabric/src/components/Button/WalletButton.tsx @@ -8,6 +8,20 @@ import { Shelf } from '../Shelf' import { Text } from '../Text' import { VisualButton, VisualButtonProps } from './VisualButton' +const StyledInteractiveText = styled(Text)` + overflow: hidden; + text-overflow: ellipsis; +` + +const StyledText = styled(Text)` + marginleft: auto; +` + +const StyledBodyText = styled(Text)<{ margin?: string | number }>` + margin-left: auto; + ${({ margin }) => margin && `margin: ${margin};`} +` + export type WalletButtonProps = Omit< VisualButtonProps & React.ComponentPropsWithoutRef<'button'>, 'variant' | 'iconRight' | 'type' | 'children' | 'icon' @@ -72,33 +86,20 @@ export function WalletButton({ {address && alias ? ( - + {alias} - + ) : ( - + {displayAddress ? truncate(displayAddress) : connectLabel} - + )} {address && balance && ( - + {balance} - + )} diff --git a/fabric/src/components/CurrencyInput/index.tsx b/fabric/src/components/CurrencyInput/index.tsx index 0e85ff87d0..8a45efe915 100644 --- a/fabric/src/components/CurrencyInput/index.tsx +++ b/fabric/src/components/CurrencyInput/index.tsx @@ -13,7 +13,7 @@ export type CurrencyInputProps = Omit theme.shadows.buttonPrimary}; } -`.withComponent('button') +` StyledMaxButton.defaultProps = { type: 'button', diff --git a/fabric/src/components/Divider/index.tsx b/fabric/src/components/Divider/index.tsx index 87cb8227c0..f020cbde22 100644 --- a/fabric/src/components/Divider/index.tsx +++ b/fabric/src/components/Divider/index.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components' -import { Box } from '../Box' +import { Box, BoxProps } from '../Box' -const Hr = Box.withComponent('hr') +const Hr = styled(Box).attrs({ as: 'hr' })`` export const Divider = styled(Hr)` margin: 0; diff --git a/fabric/src/components/ImageUpload/index.tsx b/fabric/src/components/ImageUpload/index.tsx index 0aa1edb918..07ea64400e 100644 --- a/fabric/src/components/ImageUpload/index.tsx +++ b/fabric/src/components/ImageUpload/index.tsx @@ -70,6 +70,13 @@ const Container = styled(Grid)<{ $disabled?: boolean; $active: boolean }>` } ` +const StyledText = styled(Text)` + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + direction: rtl; +` + export type ImageUploadProps = Omit & { file?: File | null requirements?: string @@ -227,18 +234,9 @@ export function ImageUpload({ - + {curFile && (typeof curFile === 'string' ? curFile : curFile.name)} - + {!disabled &&