components APIs
- Header
- Button
- Layout
- Footer
- Text
- Box
- Card
- Table
- Loading
- Select
- Loader
- Toolbar
- Icon
- CodeInput
- BottomSheet
- InfoBlock
- LanguageToggle
- ProgressCircles
- Ripple
- Toggle
- Tag
- Input
- Paginator
- Filter
- AsyncSelect
- CatalogBigButton
- ReadMore
- ConditionalWrapper
- LastCheckedDisplay
- PriceLabel
- PageTitle
- CartTable
- CartFinalPriceTable
- LoadingSpin
- InfoModal
- ProductCard
- RecommendCoupon
- PriceVales
- NomalLayout
- Web3ReactManager
- Popups
- CurrencyInput
- TransactionErrorContent
- TransactionConfirmationModal
- ConfirmationModalContent
- DoubleCurrencyLogo
- CustomModal
- CurrencySearchModal
- CurrencyLogo
- NumericalInput
- Logo
- QuestionHelper
- ListLogo
- DataTable
- WalletModal
- CustomTable
- MinimalPositionCard
- RemoveLiquidityModal
- CustomTooltip
- ColoredSlider
- ToggleSwitch
- FormattedPriceImpact
- SettingsModal
- ConfirmSwapModal
- AdvancedSwapDetails
- AddressInput
- LineChart
- StakeSyrupModal
- AccountDetails
- BetaWarningBanner
- AreaChart
- ChartType
- TokensTable
- PairTable
- TopMovers
- BarChart
- TransactionsTable
- StakeQuickModal
- UnstakeQuickModal
- SyrupCard
- CustomMenu
- SearchInput
- CustomSwitch
- FarmCard
- BuyFiatModal
- MoonpayModal
- RewardSlider
- Swap
- AddLiquidity
- PoolFinderModal
- PoolPositionCard
- SwapTokenDetails
- SuperHeader
- GlobalStyles
- PrimaryButton
- SectionTitle
- Section
- AccentSection
- ChainSelection
- CoinSelection
- AddressSelection
- SendAction
- Buttons
- Content
- Particles
- IconButton
- NotSupported
- InputSearch
- RouteGuard
- SearchBar
- FileInput
- GovBanner
- AuthForm
- DomainDetails
- Subnav
- ColumnFilter
- ImportExport
- selectFilter
- TaggedArrayInput
- FacetFilter
- ButtonSingleLine
- TextMultiline
- ButtonSelect
- BottomSheetBehavior
- InfoButton
- BulletPointX
- BulletPointCheck
- Title
- LoadingIcon
- SelectFilterControls
- CORInputForm
- SdnInputForm
- Navbar
- HomeRoute
- AuthRoute
- DocumentDetails
- DocumentStepper
- AddGame
- Auth
- Effectiveness
- Export
- PokemonType
- Moves
- Member
- MoveSelector
- Type
- Natures
- Move
- PokeInfo
- Share
- Badges
- Status
- UpdateSW
- About
- Builder
- Calculator
- Changelog
- Import
- Pokestats
- Report
- Rules
- Settings
- Tracker
- DarkThemeProvider
- NotificationHandler
- Background
- Indicator
- StyledButton
- StyledText
- Illustration
- OnboardingSlider
- FlexList
- AppLayout
- ScrollableList
- Visualization
- DataSearch
- Region
- App
- CompareApiLegend
- CompareApiBreadcrumbs
- CompareApiLink
- CompareApiCard
- ExploreApiBreadcrumbs
- ExploreApiLink
- ExploreApiSearch
- ExploreApiConst
- ApiLoader
- RefreshButton
- Listing
- PriceModal
- ConfirmationModal
- Transition
- AutoComplete
- useInput
- Avatar
- Badge
- Breadcrumbs
- ButtonDropdown
- ButtonGroup
- Capacity
- Checkbox
- Code
- Collapse
- CssBaseline
- GeistProvider
- Description
- Display
- Divider
- Dot
- Drawer
- useModal
- Fieldset
- Grid
- Image
- Keyboard
- Link
- Modal
- Note
- Page
- Pagination
- Popover
- Progress
- Radio
- Rating
- Slider
- Snippet
- Spacer
- Spinner
- Tabs
- Textarea
- Tooltip
- Tree
- useBodyScroll
- useClasses
- useClickAway
- useClipboard
- useCurrentState
- useKeyboard
- KeyMod
- KeyCode
- useMediaQuery
- useTabs
- useToasts
- User
- useTheme
- Themes
- GeistUIThemes
- useAllThemes
- CollapsableDialog
- Map
- IPForm
- IPMenu
- Container
- Parallax
- Nav
- SEO
- BlogNav
- ExtensionCard
- MenuComp
Other Related APIs
- react#useState
- react#useCallback
- react#useMemo
- react#memo
- react-redux#useDispatch
- react-redux#useSelector
- @material-ui/core#Button
- @material-ui/core#Typography
- @material-ui/core#Box
- @material-ui/core#Popover
- @material-ui/core#Divider
- @material-ui/core/styles#makeStyles
- react-feather#ArrowLeft
- components#QuestionHelper
components#ListLogo TypeScript Examples
The following examples show how to use
components#ListLogo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ListSelect.tsx From interface-v2 with GNU General Public License v3.0 | 4 votes |
ListRow = memo(function ListRow({
listUrl,
onBack,
}: {
listUrl: string;
onBack: () => void;
}) {
const classes = useStyles();
const listsByUrl = useSelector<AppState, AppState['lists']['byUrl']>(
(state) => state.lists.byUrl,
);
const selectedListUrl = useSelectedListUrl();
const dispatch = useDispatch<AppDispatch>();
const { current: list, pendingUpdate: pending } = listsByUrl[listUrl];
const [anchorEl, setAnchorEl] = useState<any>(null);
const isSelected = listUrl === selectedListUrl;
const selectThisList = useCallback(() => {
if (isSelected) return;
ReactGA.event({
category: 'Lists',
action: 'Select List',
label: listUrl,
});
dispatch(selectList(listUrl));
onBack();
}, [dispatch, isSelected, listUrl, onBack]);
const handleAcceptListUpdate = useCallback(() => {
if (!pending) return;
ReactGA.event({
category: 'Lists',
action: 'Update List from List Select',
label: listUrl,
});
dispatch(acceptListUpdate(listUrl));
}, [dispatch, listUrl, pending]);
const handleRemoveList = useCallback(() => {
ReactGA.event({
category: 'Lists',
action: 'Start Remove List',
label: listUrl,
});
if (
window.prompt(
`Please confirm you would like to remove this list by typing REMOVE`,
) === `REMOVE`
) {
ReactGA.event({
category: 'Lists',
action: 'Confirm Remove List',
label: listUrl,
});
dispatch(removeList(listUrl));
}
}, [dispatch, listUrl]);
if (!list) return null;
return (
<Box
className={classes.listRow}
key={listUrl}
id={listUrlRowHTMLId(listUrl)}
>
{list.logoURI ? (
<ListLogo logoURI={list.logoURI} alt={`${list.name} list logo`} />
) : (
<div style={{ width: '24px', height: '24px', marginRight: '1rem' }} />
)}
<Box className='listname'>
<Typography>{list.name}</Typography>
<Box className={classes.styledListUrlText} title={listUrl}>
<ListOrigin listUrl={listUrl} />
</Box>
</Box>
<div className={classes.styledMenu}>
<Box
onClick={(evt) => {
setAnchorEl(evt.currentTarget);
}}
>
<DropDown />
</Box>
<Popover
open={Boolean(anchorEl)}
onClose={() => setAnchorEl(null)}
anchorEl={anchorEl}
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
transformOrigin={{ vertical: 'top', horizontal: 'center' }}
>
<Box className={classes.popoverWrapper}>
<Typography>{list && listVersionLabel(list.version)}</Typography>
<Divider />
<Box>
<a
href={`https://tokenlists.org/token-list?url=${listUrl}`}
target='_blank'
rel='noopener noreferrer'
>
View list
</a>
<Button
onClick={handleRemoveList}
disabled={Object.keys(listsByUrl).length === 1}
>
Remove list
</Button>
{pending && (
<Button onClick={handleAcceptListUpdate}>Update list</Button>
)}
</Box>
</Box>
</Popover>
</div>
{isSelected ? (
<Button
disabled={true}
className='select-button'
style={{
width: '5rem',
minWidth: '5rem',
padding: '0.5rem .35rem',
borderRadius: '12px',
fontSize: '14px',
}}
>
Selected
</Button>
) : (
<Button onClick={selectThisList}>Select</Button>
)}
</Box>
);
})