-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed reponsiveness issues on mobile view
- Loading branch information
1 parent
c025310
commit c24af09
Showing
5 changed files
with
186 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
import React from 'react'; | ||
import { FormattedMessage } from '@edx/frontend-platform/i18n'; | ||
import { getConfig } from '@edx/frontend-platform'; | ||
import classNames from 'classnames'; | ||
import { breakpoints, useWindowSize } from '@openedx/paragon'; | ||
|
||
const UsernameDescription = () => ( | ||
<p className="text-gray-800 font-weight-normal m-0"> | ||
<FormattedMessage | ||
id="profile.username.description" | ||
defaultMessage="Your learner records information is only visible to you. Only your username is visible to others on {siteName}." | ||
description="A description of the username field" | ||
values={{ | ||
siteName: getConfig().SITE_NAME, | ||
}} | ||
/> | ||
</p> | ||
); | ||
const UsernameDescription = () => { | ||
const isMobileView = useWindowSize().width <= breakpoints.small.minWidth; | ||
return ( | ||
<p className={classNames([ | ||
'text-gray-800 font-weight-normal m-0', | ||
isMobileView ? 'h5' : 'p', | ||
])} | ||
> | ||
<FormattedMessage | ||
id="profile.username.description" | ||
defaultMessage="Your learner records information is only visible to you. Only your username is visible to others on {siteName}." | ||
description="A description of the username field" | ||
values={{ | ||
siteName: getConfig().SITE_NAME, | ||
}} | ||
/> | ||
</p> | ||
); | ||
}; | ||
|
||
export default UsernameDescription; |
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 |
---|---|---|
|
@@ -151,6 +151,9 @@ | |
max-width: 32em; | ||
} | ||
|
||
.max-width-19rem{ | ||
max-width: 19rem; | ||
} | ||
.width-75rem { | ||
width: 75rem; | ||
} | ||
|