mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-11-23 06:10:05 +00:00
feat: initial Pezkuwi Apps rebrand from polkadot-apps
Rebranded terminology: - Polkadot → Pezkuwi - Kusama → Dicle - Westend → Zagros - Rococo → PezkuwiChain - Substrate → Bizinikiwi - parachain → teyrchain Custom logos with Kurdistan brand colors (#e6007a → #86e62a): - bizinikiwi-hexagon.svg - sora-bizinikiwi.svg - hezscanner.svg - heztreasury.svg - pezkuwiscan.svg - pezkuwistats.svg - pezkuwiassembly.svg - pezkuwiholic.svg
This commit is contained in:
commit
d21bfb1320
5867 files changed
+329019
No files matched your search
@@ -0,0 +1,54 @@
|
||||
// Copyright 2017-2025 @pezkuwi/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import Icon from '../../Icon.js';
|
||||
import { styled } from '../../styled.js';
|
||||
|
||||
export interface Props {
|
||||
address: string;
|
||||
className?: string;
|
||||
colSpan?: number;
|
||||
isFavorite: boolean;
|
||||
rowSpan?: number;
|
||||
toggle: (address: string) => void;
|
||||
}
|
||||
|
||||
function Favorite ({ address, className = '', colSpan, isFavorite, rowSpan, toggle }: Props): React.ReactElement<Props> {
|
||||
const onClick = useCallback(
|
||||
() => toggle(address),
|
||||
[address, toggle]
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledTd
|
||||
className={`${className} ui--Table-Column-Favorite`}
|
||||
colSpan={colSpan}
|
||||
onClick={onClick}
|
||||
rowSpan={rowSpan}
|
||||
>
|
||||
<Icon
|
||||
color={
|
||||
isFavorite
|
||||
? 'orange'
|
||||
: 'gray'
|
||||
}
|
||||
icon='star'
|
||||
/>
|
||||
</StyledTd>
|
||||
);
|
||||
}
|
||||
|
||||
const StyledTd = styled.td`
|
||||
&& {
|
||||
box-sizing: content-box;
|
||||
cursor: pointer;
|
||||
min-width: 1rem;
|
||||
padding-right: 0.35rem;
|
||||
text-align: right;
|
||||
width: 1rem;
|
||||
}
|
||||
`;
|
||||
|
||||
export default React.memo(Favorite);
|
||||
Reference in new issue
Block a user