-
-
Notifications
You must be signed in to change notification settings - Fork 87
/
index.js
36 lines (30 loc) · 950 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import styled from 'styled-components';
import React from 'react';
import PropTypes from 'prop-types';
import { SECONDARY_TEXT_COLOUR } from 'govuk-colours';
import { spacing, typography } from '@govuk-react/lib';
import { SPACING_POINTS } from '@govuk-react/constants';
import { deprecate } from '@govuk-react/hoc';
const StyledHeader = styled('span')(
typography.font({ size: 27 }),
{
color: SECONDARY_TEXT_COLOUR,
marginBottom: SPACING_POINTS[1],
},
spacing.withWhiteSpace()
);
/**
*
* ### Usage
*
* This component is DEPRECATED.
*
* Please use the `Caption` component instead.
*/
const SupportingHeader = props => <StyledHeader {...props} />;
SupportingHeader.propTypes = {
/** Text to be rendered as a supporting header */
children: PropTypes.string.isRequired,
};
export { SupportingHeader as DocumentedSupportingHeader };
export default deprecate(SupportingHeader, 'please use the Caption component instead');