@ndla/ui 4.1.4 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Article/Article.js +3 -9
- package/es/Article/ArticleByline.js +35 -32
- package/es/RelatedArticleList/RelatedArticleList.js +1 -1
- package/es/SearchTypeResult/SearchFieldHeader.js +14 -13
- package/es/SectionHeading/SectionHeading.js +3 -2
- package/lib/Article/Article.js +3 -9
- package/lib/Article/ArticleByline.js +35 -32
- package/lib/RelatedArticleList/RelatedArticleList.js +1 -1
- package/lib/SearchTypeResult/SearchFieldHeader.js +13 -13
- package/lib/SectionHeading/SectionHeading.js +3 -2
- package/package.json +4 -4
- package/src/Article/Article.tsx +2 -6
- package/src/Article/ArticleByline.tsx +33 -26
- package/src/RelatedArticleList/RelatedArticleList.tsx +2 -2
- package/src/SearchTypeResult/SearchFieldHeader.tsx +7 -2
- package/src/SectionHeading/SectionHeading.tsx +5 -4
|
@@ -73,6 +73,11 @@ const SearchInput = styled.input`
|
|
|
73
73
|
margin-left: 3px;
|
|
74
74
|
`;
|
|
75
75
|
|
|
76
|
+
const iconStyle = {
|
|
77
|
+
width: '24px',
|
|
78
|
+
height: '24px',
|
|
79
|
+
};
|
|
80
|
+
|
|
76
81
|
type Props = {
|
|
77
82
|
onSubmit: (event: FormEvent<HTMLFormElement>) => void;
|
|
78
83
|
value?: string;
|
|
@@ -135,11 +140,11 @@ const SearchFieldHeader = ({ value, onSubmit, onChange, filters, activeFilters }
|
|
|
135
140
|
inputRef.current.focus();
|
|
136
141
|
}
|
|
137
142
|
}}>
|
|
138
|
-
<CrossIcon style={{
|
|
143
|
+
<CrossIcon style={iconStyle} title={t<string>('welcomePage.resetSearch')} />
|
|
139
144
|
</ClearButton>
|
|
140
145
|
)}
|
|
141
146
|
<SearchButton type="submit" value={t<string>('searchPage.search')}>
|
|
142
|
-
<SearchIcon style={{
|
|
147
|
+
<SearchIcon style={iconStyle} title={t<string>('searchPage.search')} />
|
|
143
148
|
</SearchButton>
|
|
144
149
|
</StyledForm>
|
|
145
150
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React, { ElementType, ReactNode } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import BEMHelper from 'react-bem-helper';
|
|
4
4
|
|
|
@@ -9,9 +9,10 @@ interface Props {
|
|
|
9
9
|
large?: boolean;
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
|
-
const SectionHeading = ({ children, large = false, className }: Props) =>
|
|
13
|
-
|
|
14
|
-
)
|
|
12
|
+
const SectionHeading = ({ children, large = false, className }: Props) => {
|
|
13
|
+
const Wrapper: ElementType = large ? 'h1' : 'h2';
|
|
14
|
+
return <Wrapper {...classes('', { large: !!large }, className)}>{children}</Wrapper>;
|
|
15
|
+
};
|
|
15
16
|
|
|
16
17
|
export default SectionHeading;
|
|
17
18
|
|