Skip to content

Commit

Permalink
Fixing default color on Text component
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewrmarshall committed Jun 12, 2023
1 parent e658cd9 commit f99f22f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 2 additions & 6 deletions ui/components/component-library/text/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Good typography improves readability, legibility and hierarchy of information.

## Props

The `Text` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
The `Text` accepts all props below as well as all [Box](/docs/components-componentlibrary-box--docs#props) component props

<ArgsTable of={Text} />

Expand Down Expand Up @@ -354,10 +354,6 @@ import { Text } from '../../component-library';
</Text>
```

### Box Props

Use any valid box props [Box](/?path=/story/components-ui-box--default-story) component props to the Text component.

### Class Name

Adds an additional class to the `Text` component
Expand Down Expand Up @@ -569,7 +565,7 @@ Values using the `TextAlign` object from `./ui/helpers/constants/design-system.j

### Box Props

Box props are now integrated with the `Text` component. Valid box props: [Box](/?path=/story/components-ui-box--default-story)
Box props are now integrated with the `Text` component. Valid Box props: [Box](/docs/components-componentlibrary-box--docs#props)

You no longer need to pass these props as an object through `boxProps`

Expand Down
3 changes: 0 additions & 3 deletions ui/components/component-library/text/text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ $text-variants: (
}
}



.mm-text {
// Set default styles
color: var(--color-text-default);
font-family: var(--font-family-sans);

&:is(strong),
Expand Down
6 changes: 5 additions & 1 deletion ui/components/component-library/text/text.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React from 'react';
import classnames from 'classnames';

import { TextVariant } from '../../../helpers/constants/design-system';
import {
TextVariant,
TextColor,
} from '../../../helpers/constants/design-system';

import { Box } from '..';

Expand Down Expand Up @@ -66,6 +69,7 @@ export const Text: TextComponent = React.forwardRef(
as={tag}
dir={textDirection}
ref={ref}
color={TextColor.textDefault}
{...props} // TODO: Need to fix Box types to allow for spreading props
>
{children}
Expand Down

0 comments on commit f99f22f

Please sign in to comment.