Skip to content

Commit

Permalink
refactor: Remove centralized type
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Anton committed May 29, 2024
1 parent 4e21ce2 commit 8e0ed2f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions libs/design-system/src/tag/Tag.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Badge } from '@mantine/core';
import { ComponentFoundationProps } from '../types/ComponentFoundationProps';
import { PropsWithChildren } from 'react';
import { colors } from '../config';

interface ITagProps extends ComponentFoundationProps {
interface ITagProps extends PropsWithChildren<{}> {
color?: string;
border?: string;
ml?: number;
Expand Down
3 changes: 0 additions & 3 deletions libs/design-system/src/types/ComponentFoundationProps.tsx

This file was deleted.

5 changes: 2 additions & 3 deletions libs/design-system/src/typography/text/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from 'react';
import React, { PropsWithChildren } from 'react';
import { Text as MantineText, MantineColor, useMantineTheme, TextProps } from '@mantine/core';

import { colors } from '../../config';
import { SpacingProps } from '../../shared/spacing.props';
import { ComponentFoundationProps } from '../../types/ComponentFoundationProps';

interface ITextProps extends ComponentFoundationProps, SpacingProps {
interface ITextProps extends PropsWithChildren<{}>, SpacingProps {
size?: TextProps['size'];
style?: TextProps['style'];
styles?: TextProps['styles'];
Expand Down
4 changes: 2 additions & 2 deletions libs/design-system/src/typography/title/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { MantineColor, Title as MantineTitle, useMantineTheme } from '@mantine/core';
import { ComponentFoundationProps } from '../../types/ComponentFoundationProps';
import { PropsWithChildren } from 'react';
import { colors } from '../../config';
import { SpacingProps } from '../../shared/spacing.props';

interface ITitleProps extends ComponentFoundationProps, SpacingProps {
interface ITitleProps extends PropsWithChildren<{}>, SpacingProps {
size?: 1 | 2;
color?: MantineColor;
}
Expand Down

0 comments on commit 8e0ed2f

Please sign in to comment.