-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep confidence warning only on methods and data
- Loading branch information
1 parent
bdfdc66
commit 67e3159
Showing
12 changed files
with
27 additions
and
124 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
30 changes: 7 additions & 23 deletions
30
frontend/scripts/react-components/shared/confidence-warning/confidence-warning.component.jsx
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,36 +1,20 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Text from 'react-components/shared/text'; | ||
import './confidence-warning.scss'; | ||
|
||
const ConfidenceWarning = ({ variant, noIcon }) => ( | ||
<Text | ||
size={variant === 'selector' ? 'xs' : 'sm'} | ||
className={`warning warning-${variant}`} | ||
color="grey" | ||
> | ||
{!noIcon && ( | ||
<svg className="icon warning-bell-icon"> | ||
<use xlinkHref="#icon-warning-bell" /> | ||
</svg> | ||
)} | ||
const ConfidenceWarning = () => ( | ||
<Text className="warning" color="grey"> | ||
<svg className="icon warning-bell-icon"> | ||
<use xlinkHref="#icon-warning-bell" /> | ||
</svg> | ||
<div className="warning-text"> | ||
<Text weight="bold" className="warning-bold" as="span"> | ||
Note:{' '} | ||
</Text> | ||
This data is based on new methodological approaches and we welcome feedback. | ||
This dataset is experimental and we welcome feedback. Please refer to the methods to | ||
understand the modelling work and its limitations. | ||
</div> | ||
</Text> | ||
); | ||
|
||
ConfidenceWarning.defaultProps = { | ||
variant: 'sankey', | ||
noIcon: false | ||
}; | ||
|
||
ConfidenceWarning.propTypes = { | ||
variant: PropTypes.oneOf(['sankey', 'dashboard', 'profile']), | ||
noIcon: PropTypes.bool | ||
}; | ||
|
||
export default ConfidenceWarning; |
34 changes: 3 additions & 31 deletions
34
frontend/scripts/react-components/shared/confidence-warning/confidence-warning.scss
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,42 +1,14 @@ | ||
.warning { | ||
margin: 5px 0 0; | ||
margin-top: 10px; | ||
display: flex; | ||
align-items: flex-start; | ||
} | ||
|
||
.warning-bell-icon { | ||
overflow: visible; | ||
margin-left: 0; | ||
margin: 2px 5px 0 0; | ||
} | ||
|
||
.warning-text { | ||
display: inline; | ||
} | ||
|
||
.warning-sankey, | ||
.warning-profile { | ||
.warning-bell-icon { | ||
margin-right: 5px; | ||
} | ||
} | ||
|
||
.warning-sankey { | ||
.warning-bell-icon { | ||
margin-top: 2px; | ||
} | ||
} | ||
|
||
.warning-dashboard { | ||
&.warning { | ||
margin: 5px 0 30px 0; | ||
} | ||
|
||
.warning-bell-icon { | ||
margin-right: 5px; | ||
overflow: visible; | ||
transform: translate(0px, -1px); | ||
} | ||
} | ||
|
||
.warning-profile { | ||
margin-top: 10px; | ||
} |
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