-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…address-component-into-top-header
- Loading branch information
Showing
18 changed files
with
135 additions
and
35 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/core/src/components/CopyToClipboard/CopyToClipboard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 32 additions & 3 deletions
35
packages/core/src/components/StateIndicator/StateIndicatorDot.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
import { FiberManualRecord as FiberManualRecordIcon } from '@mui/icons-material'; | ||
import { ConnectCheckmark, ConnectCancel, ConnectReload } from '@chia-network/icons'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
export default styled(FiberManualRecordIcon)` | ||
import State from '../../constants/State'; | ||
|
||
const WrapperStyled = styled.div` | ||
display: inline-block; | ||
width: 18px; | ||
height: 18px; | ||
font-size: 1rem; | ||
color: ${({ color }) => color}; | ||
border: 2px solid ${({ color }) => color}; | ||
border-radius: 50%; | ||
`; | ||
|
||
type StateIndicatorDotTypes = { | ||
color: string; | ||
state: string; | ||
}; | ||
|
||
export default function StateIndicatorDot(props: StateIndicatorDotTypes) { | ||
const { color, state } = props; | ||
function renderIcon() { | ||
if (state === State.SUCCESS) { | ||
return <ConnectCheckmark />; | ||
} | ||
if (state === State.WARNING) { | ||
return <ConnectReload />; | ||
} | ||
if (state === State.ERROR) { | ||
return <ConnectCancel />; | ||
} | ||
return null; | ||
} | ||
return <WrapperStyled color={color}>{renderIcon()}</WrapperStyled>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
import { SvgIcon, SvgIconProps } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
import ConnectCancelIcon from './images/cancelConnect.svg'; | ||
import ConnectCheckmarkIcon from './images/checkmarkConnect.svg'; | ||
import ExitIcon from './images/exit.svg'; | ||
import ConnectReloadIcon from './images/reloadConnect.svg'; | ||
import WalletConnectIcon from './images/walletConnect.svg'; | ||
|
||
export default function WalletConnect(props: SvgIconProps) { | ||
return <SvgIcon component={WalletConnectIcon} viewBox="0 0 24 24" {...props} />; | ||
} | ||
|
||
export function ConnectCheckmark(props: SvgIconProps) { | ||
return <SvgIcon component={ConnectCheckmarkIcon} {...props} viewBox="-2 -3 20 20" />; | ||
} | ||
export function ConnectCancel(props: SvgIconProps) { | ||
return <SvgIcon component={ConnectCancelIcon} {...props} viewBox="-3 -3 20 20" />; | ||
} | ||
export function ConnectReload(props: SvgIconProps) { | ||
return <SvgIcon component={ConnectReloadIcon} viewBox="-1 0 21 21" {...props} />; | ||
} | ||
export function Exit(props: SvgIconProps) { | ||
return <SvgIcon component={ExitIcon} {...props} />; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.