Skip to content

Commit

Permalink
fix(suite): fix issues with TokenSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Nov 6, 2024
1 parent d721477 commit 7870870
Show file tree
Hide file tree
Showing 15 changed files with 599 additions and 1,456 deletions.
12 changes: 6 additions & 6 deletions packages/components/src/components/form/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type WrapperProps = TransientProps<
$isWithPlaceholder: boolean;
$hasBottomPadding: boolean;
$elevation: Elevation;
$focusEnabled: boolean;
$isFocusEnabled: boolean;
};

const Wrapper = styled.div<WrapperProps>`
Expand Down Expand Up @@ -163,8 +163,8 @@ const Wrapper = styled.div<WrapperProps>`
}
&:focus-within {
${({ $focusEnabled }) =>
$focusEnabled
${({ $isFocusEnabled }) =>
$isFocusEnabled
? css`
.${reactSelectClassNamePrefix}__dropdown-indicator {
transform: rotate(180deg);
Expand Down Expand Up @@ -278,7 +278,7 @@ interface CommonProps extends Omit<ReactSelectProps<Option>, 'onChange' | 'menuI
* @description pass `null` if bottom text can be `undefined`
*/
bottomText?: ReactNode;
focusEnabled?: boolean;
isFocusEnabled?: boolean;
hasBottomPadding?: boolean;
minValueWidth?: string; // TODO: should be probably removed
inputState?: InputState;
Expand All @@ -305,7 +305,7 @@ export const Select = ({
useKeyPressScroll,
isSearchable = false,
minValueWidth = 'initial',
focusEnabled = true,
isFocusEnabled = true,
isMenuOpen,
inputState,
components,
Expand Down Expand Up @@ -368,7 +368,7 @@ export const Select = ({
$minValueWidth={minValueWidth}
$isDisabled={isDisabled}
$isMenuOpen={isMenuOpen}
$focusEnabled={focusEnabled}
$isFocusEnabled={isFocusEnabled}
$isWithLabel={!!label}
$isWithPlaceholder={!!placeholder}
$hasBottomPadding={hasBottomPadding === true && bottomText === null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const BadgeWrapper = styled.div`

type AssetItemProps = {
name?: string;
symbol: NetworkSymbol;
symbol: string;
badge: string | undefined;
networkSymbol: NetworkSymbol;
networkSymbol: NetworkSymbol | ({} & string);
coingeckoId: string;
logo: JSX.Element;
isFavorite?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ThemeProvider } from 'styled-components';
import { intermediaryTheme, NewModal } from '@trezor/components';
import { action } from '@storybook/addon-actions';
import { IntlProvider } from 'react-intl';
import { selectAssetModalOptions, selectAssetModalNetworks } from './mockData';
import { selectAssetModalOptions, selectAssetModalNetworks } from './SelectAssetModal.storiesData';
import { NetworkFilterCategory } from './SelectAssetModal';

const meta: Meta = {
Expand Down
Loading

0 comments on commit 7870870

Please sign in to comment.