-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add stride [web-stride] (#1297)
## Description Closes: [BDU-1096](https://forbole.atlassian.net/browse/BDU-1096) <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist _All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues._ I have... - [ ] ran linting via `yarn lint` - [ ] wrote tests where necessary - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] targeted the correct branch - [ ] provided a link to the relevant issue or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed - [ ] added a changeset via [`yarn && yarn changeset`](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) [BDU-1096]: https://forbole.atlassian.net/browse/BDU-1096?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Magic Cat <[email protected]>
- Loading branch information
Showing
23 changed files
with
19,041 additions
and
5,772 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import Avatar from '@/components/avatar'; | ||
import useStyles from '@/components/avatar_name/styles'; | ||
import MiddleEllipsis from '@/components/MiddleEllipsis'; | ||
import { ADDRESS_DETAILS } from '@/utils/go_to_page'; | ||
import Tooltip from '@mui/material/Tooltip'; | ||
import Zoom from '@mui/material/Zoom'; | ||
import Link from 'next/link'; | ||
import { FC } from 'react'; | ||
|
||
const AvatarName: FC<AvatarName & JSX.IntrinsicElements['div'] & { displayAddress?: string }> = ({ | ||
className, | ||
address, | ||
name, | ||
imageUrl, | ||
href = ADDRESS_DETAILS, | ||
image, | ||
target, | ||
displayAddress, | ||
...props | ||
}) => { | ||
const { classes, cx } = useStyles(); | ||
|
||
const adx = displayAddress || address; | ||
|
||
return ( | ||
<Tooltip | ||
TransitionComponent={Zoom} | ||
title={<pre>{adx}</pre>} | ||
placement="bottom" | ||
arrow | ||
PopperProps={{ className: classes.popper }} | ||
slotProps={{ tooltip: { className: classes.tooltip } }} | ||
> | ||
<Link shallow href={href(adx)} target={target}> | ||
<span className={cx(classes.root, className)} {...props}> | ||
<Avatar className={classes.avatar} address={address} imageUrl={imageUrl ?? undefined} /> | ||
<MiddleEllipsis className={classes.text} content={name} /> | ||
</span> | ||
</Link> | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
export default AvatarName; |
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
Oops, something went wrong.