Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/components/Board/Card/CardFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ const CardFooter = ({
</Button>
<Text
size="xs"
visible={votesInThisCard.length > 0}
css={{
visibility: votesInThisCard.length > 0 ? 'visible' : 'hidden',
width: '10px',
}}
>
Expand Down Expand Up @@ -248,7 +248,7 @@ const CardFooter = ({
>
<Icon name={isCommentsOpened ? 'comment-filled' : 'comment'} />
</Button>
<Text css={{ visibility: comments.length > 0 ? 'visible' : 'hidden' }} size="xs">
<Text visible={comments.length > 0} size="xs">
{comments.length}
</Text>
</Flex>
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/components/Primitives/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ const Text = styled('span', {
color: '$primary300',
},
},
visible: {
true: {
visibility: 'visible',
},
false: {
visibility: 'hidden',
},
},
color: {
white: {
color: '$white',
Expand Down
11 changes: 0 additions & 11 deletions frontend/src/components/Primitives/UnorderedList.tsx

This file was deleted.

23 changes: 10 additions & 13 deletions frontend/src/components/auth/ForgotPassword/TroubleLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ const MainContainer = styled('form', Flex, {
width: '100%',
});

const GoBackWrapper = styled(Flex, {
mt: '$24',
textAlign: 'center',
'&:hover': {
textDecorationLine: 'underline',
cursor: 'pointer',
},
});

interface TroubleLoginProps {
setShowTroubleLogin: Dispatch<SetStateAction<boolean>>;
}
Expand Down Expand Up @@ -87,10 +78,16 @@ const TroubleLogin: React.FC<TroubleLoginProps> = ({ setShowTroubleLogin }) => {
<Button size="lg" type="submit">
Recover password
</Button>
<GoBackWrapper align="center" gap="8" onClick={handleShowTroubleLogginIn}>
<Icon name="arrow-left" />
<Text>Go back</Text>
</GoBackWrapper>
<Flex>
<Button
variant="link"
css={{ pl: '0', mt: '$24', color: '$primary500' }}
onClick={handleShowTroubleLogginIn}
>
<Icon name="arrow-long-left" />
Go Back
</Button>
</Flex>
</FormProvider>
</MainContainer>
);
Expand Down
14 changes: 4 additions & 10 deletions frontend/src/components/auth/LoginForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,15 @@ const LoginForm: React.FC<LoginFormProps> = ({ setShowTroubleLogin }) => {
{loading.credentials && <DotsLoading color="primary800" size={10} />}
{!loading.credentials && 'Log in'}
</Button>
<Text
<Button
data-testid="forgot-password-button"
variant="link"
size="sm"
css={{
alignSelf: 'center',
mt: '$16',
'&:hover': {
textDecorationLine: 'underline',
cursor: 'pointer',
},
}}
css={{ color: '$primary500', mt: '$16' }}
onClick={handleShowTroubleLogginIn}
>
Forgot password
</Text>
</Button>
{AUTH_SSO && (
<Flex align="center" direction="column" justify="center">
<OrSeparator>
Expand Down
23 changes: 10 additions & 13 deletions frontend/src/components/auth/SignUp/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ import { SignUpEnum } from '@/utils/signUp.enum';

const StyledForm = styled('form', Flex, { width: '100%' });

const GoBackWrapper = styled(Flex, {
mt: '$24',
textAlign: 'center',
'&:hover': {
textDecorationLine: 'underline',
cursor: 'pointer',
},
});

interface RegisterFormProps {
emailName: { email: string; goback: boolean };
setShowSignUp: Dispatch<React.SetStateAction<SignUpEnum>>;
Expand Down Expand Up @@ -148,10 +139,16 @@ const RegisterForm: React.FC<RegisterFormProps> = ({
>
Sign up
</Button>
<GoBackWrapper align="center" gap="8" onClick={handleShowSignUp}>
<Icon css={{ width: '$20', height: '$20' }} name="arrow-long-left" />
<Text>Go back</Text>
</GoBackWrapper>
<Flex>
<Button
variant="link"
css={{ pl: '0', mt: '$24', color: '$primary500' }}
onClick={handleShowSignUp}
>
<Icon name="arrow-long-left" />
Go Back
</Button>
</Flex>
</StyledForm>
</FormProvider>
);
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/stories/Text.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ const DISABLE_ARG_TYPES = {
size: {
control: false,
},
visible: {
control: false,
},
};

export default {
Expand Down Expand Up @@ -151,6 +154,15 @@ export default {
type: { summary: COLOR_OPTIONS.join('|') },
},
},
visible: {
control: { type: 'boolean' },
description: 'Controls the component visibility.',
table: {
type: { summary: 'boolean' },
defaultValue: { summary: 'true' },
},
defaultValue: true,
},
},
};

Expand Down