-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add bypass DHIS2 version [DHIS2-15905] (#193)
* feat: add bypass component to general settings * feat: add users info as help text * feat: add info label to new form * feat: regenerate en.pot
- Loading branch information
Showing
8 changed files
with
159 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import cx from 'classnames' | ||
import PropTypes from 'prop-types' | ||
import React from 'react' | ||
|
||
export const HelpText = ({ helpText, warning, type }) => { | ||
if (!warning) { | ||
return helpText | ||
} | ||
|
||
return ( | ||
<> | ||
<span> | ||
{helpText} | ||
<span | ||
className={cx('prefix', { | ||
prefixInfo: type === 'info', | ||
})} | ||
> | ||
{warning} | ||
</span> | ||
</span> | ||
|
||
<style>{` | ||
.prefix { | ||
font - family: monospace; | ||
font-size: 13px; | ||
color: var(--colors-grey800); | ||
background: var(--colors-grey300); | ||
padding: 2px var(--spacers-dp4); | ||
margin-right: var(--spacers-dp4); | ||
border-radius: 3px; | ||
} | ||
.prefixInfo { | ||
color: var(--colors-blue800); | ||
background: var(--colors-blue050); | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} | ||
|
||
HelpText.propTypes = { | ||
helpText: PropTypes.string, | ||
warning: PropTypes.string, | ||
type: PropTypes.string, | ||
} |
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