Skip to content

Commit da57101

Browse files
committed
fix(button,tab,textfield): make components inherit font-family
1 parent 956f0c6 commit da57101

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/components/Button/Button.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const commonButtonStyles = css`
4343
&:not(:disabled) {
4444
cursor: pointer;
4545
}
46+
font-family: inherit;
4647
`;
4748

4849
export const StyledButton = styled.button`

src/components/Tab/Tab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const StyledTab = styled.button`
2323
cursor: default;
2424
color: ${({ theme }) => theme.text};
2525
user-select: none;
26+
font-family: inherit;
2627
&:focus:after,
2728
&:active:after {
2829
content: '';
@@ -57,7 +58,6 @@ const StyledTab = styled.button`
5758
}
5859
`;
5960

60-
// TODO handle tabIndex
6161
const Tab = React.forwardRef(function Tab(props, ref) {
6262
const { value, onClick, selected, children, ...otherProps } = props;
6363

src/components/TextField/TextField.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import propTypes from 'prop-types';
33

44
import styled, { css } from 'styled-components';
55
import { createDisabledTextStyles, createFlatBoxStyles } from '../common';
6-
import { blockSizes, fontFamily } from '../common/system';
6+
import { blockSizes } from '../common/system';
77
import Cutout from '../Cutout/Cutout';
88

99
const sharedWrapperStyles = css`
@@ -39,7 +39,7 @@ const sharedInputStyles = css`
3939
background: none;
4040
font-size: 1rem;
4141
min-height: 27px;
42-
font-family: ${fontFamily};
42+
font-family: inherit;
4343
color: ${({ theme }) => theme.inputText};
4444
${({ disabled, variant }) =>
4545
variant !== 'flat' && disabled && createDisabledTextStyles()}

src/components/common/system.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// TODO - implement styled-system
22

3+
// eslint-disable-next-line import/prefer-default-export
34
export const blockSizes = {
45
sm: '27px',
56
md: '35px',
67
lg: '43px'
78
};
8-
9-
export const fontFamily = 'sans-serif';

0 commit comments

Comments
 (0)