Skip to content

Commit

Permalink
Merge pull request #788 from securityscorecard/UXD-1215-change-text-d…
Browse files Browse the repository at this point in the history
…efault-size

fix(Text): change default size
  • Loading branch information
ajkl2533 authored Jul 12, 2023
2 parents 72c1bf7 + 7ab6ffc commit 74358c6
Show file tree
Hide file tree
Showing 176 changed files with 14 additions and 13 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components/Accordion/Accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Paragraph, Text } from '../typographyLegacy';
import { Button } from '../Button';
import Accordion from './Accordion';
import { AccordionProps } from './Accordion.types';
import { TextSizes } from '../typographyLegacy/Text/Text.enums';

export default {
title: 'components/Accordion',
Expand Down Expand Up @@ -53,7 +54,7 @@ const AccordionItemTitle = () => (
<Stack gap="sm">
<Inline align="center" gap="md">
<HexGrade grade="A" size={24} />
<Text>Company Name</Text>
<Text size={TextSizes.lg}>Company Name</Text>
</Inline>
<Paragraph>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
Expand Down
7 changes: 2 additions & 5 deletions src/components/Callout/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { getColor, getFontSize, getRadii, pxToRem } from '../../utils';
import { Inline, Padbox } from '../layout';
import { Text } from '../typographyLegacy';
import { Icon } from '../Icon';
import { TextSizes } from '../typographyLegacy/Text/Text.enums';
import { SSCIcons } from '../Icon/Icon.types';
import { SSCIconNames } from '../../theme/icons/icons.enums';
import { CalloutColors } from './Callout.enums';
Expand All @@ -33,7 +32,7 @@ const IconContainer = styled.div<CalloutContainerProps>`
display: flex;
align-items: center;
justify-content: center;
font-size: ${getFontSize('mdPlus')};
font-size: ${getFontSize('lg')};
${({ $color }) => calloutIconColors[$color]};
`;

Expand Down Expand Up @@ -77,9 +76,7 @@ const Callout: React.FC<CalloutProps> = ({
icon
)}
</IconContainer>
<Text size={TextSizes.lg} style={{ alignSelf: 'center' }}>
{children}
</Text>
<Text style={{ alignSelf: 'center' }}>{children}</Text>
</Inline>
</Container>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Card/CardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ export const CardIconButton = styled.button<{
background-color: ${({ $isActive }) =>
$isActive ? getColor('primary.50') : 'transparent'};
border: none;
box-sizing: content-box;
color: ${getColor('neutral.800')};
display: flex;
align-items: center;
border-radius: ${getRadii('default')};
padding: ${getSpace(SpaceSizes.sm)};
height: 2rem;
${(props) =>
props.as !== 'div' &&
css`
Expand Down Expand Up @@ -82,7 +83,6 @@ const StyledIcon = styled(Icon).withConfig<{ color: Color }>({
shouldForwardProp: (property) => !includes(property, ['color']),
})`
background: ${getColor('neutral.0')};
border: 1px solid ${getColor('neutral.0')};
border-radius: 100%;
color: ${({ color, theme }) =>
isNotUndefined(color) ? getColor(color, { theme }) : 'inherit'};
Expand Down
1 change: 1 addition & 0 deletions src/components/forms/Password/Password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ToggleButton = styled.button`
width: ${pxToRem(16)};
position: absolute;
top: 0;
bottom: 0;
right: 0;
${({ theme }) =>
createPadding({
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/Range/Range.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const Range = forwardRef<HTMLInputElement, RangeProps>(
$left={calcPercentage(rangeValue, min, max)}
isDisabled={isDisabled}
>
{rangeValue}
<Text>{rangeValue}</Text>
</RangeValue>
</RangeValueContainer>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/components/typographyLegacy/Paragraph/Paragraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Paragraph.propTypes = {
};

Paragraph.defaultProps = {
size: TextSizes.lg,
size: TextSizes.md,
variant: TextVariants.primary,
as: 'p',
};
Expand Down
6 changes: 4 additions & 2 deletions src/components/typographyLegacy/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Text.propTypes = {
};

Text.defaultProps = {
size: TextSizes.lg,
size: TextSizes.md,
variant: TextVariants.primary,
isBold: false,
};
Expand All @@ -129,12 +129,14 @@ export default Text;
export const Strong = styled(Text).attrs<StrongProps>(() => ({
as: 'strong',
isBold: true,
size: TextSizes.inherit,
}))``;

Strong.propTypes = {
variant: PropTypes.oneOf(Object.values(TextVariants)),
};
Strong.defaultProps = {
size: TextSizes.inherit,
};

export const Code = styled(Text).attrs<CodeProps>(() => ({
variant: TextVariants.monospace,
Expand Down
2 changes: 1 addition & 1 deletion src/theme/GlobalStyles/GlobalStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default createGlobalStyle`
background: ${getColor('neutral.0')};
font-family: ${getFontFamily('base')};
font-weight: ${getFontWeight('regular')};
font-size: ${pxToRem(BASE_FONT_SIZE)};
font-size: ${pxToRem(BASE_FONT_SIZE * 0.875)};
line-height: ${pxToRem(BASE_LINE_HEIGHT)};
color: ${getColor('neutral.900')};
}
Expand Down

0 comments on commit 74358c6

Please sign in to comment.