Skip to content

Commit

Permalink
fix: extend props correctly on recently changed interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rssilva committed Jul 23, 2024
1 parent 3a3cc98 commit 1e617d4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/components/src/components/Label/Label.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from "react";
import { Box, BoxProps } from "../../primitives/Box";

export interface LabelProps extends BoxProps {
export interface LabelProps
extends Omit<React.HTMLAttributes<HTMLLabelElement>, "color">,
BoxProps {
/** Adjusts the cursor to be not-allowed. */
disabled?: boolean;
/** Use and `id` to tie a label directly to a specific form element. */
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/components/List/OrderedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import styled from "@xstyled/styled-components";
import React from "react";
import { Box, BoxProps } from "../../primitives/Box";

export interface OrderedListProps extends BoxProps {
export interface OrderedListProps
extends Omit<React.HTMLAttributes<HTMLOListElement>, "color">,
BoxProps {
/** The list items */
children: NonNullable<React.ReactNode>;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/components/List/UnorderedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import styled from "@xstyled/styled-components";
import React from "react";
import { Box, BoxProps } from "../../primitives/Box";

export interface UnorderedListProps extends BoxProps {
export interface UnorderedListProps
extends Omit<React.HTMLAttributes<HTMLUListElement>, "color">,
BoxProps {
/** The list items */
children: NonNullable<React.ReactNode>;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/components/Paragraph/Paragraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { Box, BoxProps } from "../../primitives/Box";

type ParagraphSizeOptions = "large" | "medium" | "small";

export interface ParagraphProps extends BoxProps {
export interface ParagraphProps
extends Omit<React.HTMLAttributes<HTMLParagraphElement>, "color">,
BoxProps {
/** The contents of the paragraph. Can be text or valid text related HTML, i.e. anchor and strong elements. */
children: NonNullable<React.ReactNode>;
/** Changes the font-size and line-height of the Paragraph. */
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/components/Table/Td.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import PropTypes from "prop-types";
import { Box, BoxProps } from "../../primitives/Box";
import { TableContext } from "./TableContext";

export interface TdProps extends BoxProps {
export interface TdProps
extends Omit<React.HTMLAttributes<HTMLTableCellElement>, "color">,
BoxProps {
/** The valid HTML contents of the table cell. */
children?: React.ReactNode;
/** Used to make a cell span over multiple columns. */
Expand Down

0 comments on commit 1e617d4

Please sign in to comment.