Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Add tooltip to reaction button (#497)
* Add tooltip * Fix x coordinate * Delete delay from hide * Rounded and no triangle * Translations and width fix * Update test and svg name * New component and logic in the IntroNotification * Add Intro Notification unit test * Add Footer Test * Fix footer test * Change toolbar mock * Mock individualy * typo * Remove console * Gave up * Delete comments
- Loading branch information
Showing
18 changed files
with
293 additions
and
41 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
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
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,33 @@ | ||
/*! | ||
* This file is part of the Stooa codebase. | ||
* | ||
* (c) 2020 - present Runroom SL | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { useState } from 'react'; | ||
import { StyledIntroNotification } from './styles'; | ||
import Cross from '@/ui/svg/cross.svg'; | ||
import useTranslation from 'next-translate/useTranslation'; | ||
|
||
const IntroNotification = () => { | ||
const [showIntroNotification, setShowIntroNotification] = useState(true); | ||
const { t } = useTranslation('app'); | ||
|
||
if (showIntroNotification) { | ||
return ( | ||
<StyledIntroNotification data-testid="intro-notification"> | ||
{t('notification.joinAfterIntroduction')} | ||
<button className="cross" onClick={() => setShowIntroNotification(false)}> | ||
<Cross /> | ||
</button> | ||
</StyledIntroNotification> | ||
); | ||
} else { | ||
return null; | ||
} | ||
}; | ||
|
||
export default IntroNotification; |
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,30 @@ | ||
/*! | ||
* This file is part of the Stooa codebase. | ||
* | ||
* (c) 2020 - present Runroom SL | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import { CustomToast } from '@/ui/CustomToast'; | ||
import { space } from '@/ui/helpers'; | ||
import styled from 'styled-components'; | ||
|
||
const StyledIntroNotification = styled(CustomToast)` | ||
padding-right: ${space(4.5)}; | ||
& > .cross { | ||
width: 16px; | ||
height: 16px; | ||
position: absolute; | ||
right: ${space(1.25)}; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
& svg path { | ||
fill: currentColor; | ||
} | ||
} | ||
`; | ||
|
||
export { StyledIntroNotification }; |
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 was deleted.
Oops, something went wrong.
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.