Skip to content

Commit

Permalink
Feature/ds 294 (#847)
Browse files Browse the repository at this point in the history
* Typescript types are more lenient in some instances

* Certain components are now allowing react.reactnode instead of string in their typings

* reverted dropdown changes
  • Loading branch information
fraincs authored Sep 3, 2024
1 parent 346eb1d commit 2df12a9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .changeset/fresh-emus-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@igloo-ui/alert": patch
"@igloo-ui/bar-chart": patch
"@igloo-ui/checkbox": patch
"@igloo-ui/form-group": patch
"@igloo-ui/list": patch
---

Certain components are now allowing react.reactnode instead of string in their typings
8 changes: 4 additions & 4 deletions packages/Alert/src/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type Type = "announcement" | "info" | "premium" | "success" | "warning";
export type Appearance = "card" | "inline" | "horizontal";

export interface AlertButton {
label: string;
label: React.ReactNode;
onClick: () => void;
}

Expand Down Expand Up @@ -214,9 +214,9 @@ const Alert: React.FunctionComponent<AlertProps> = ({
{hasButton && renderAlertActionButton(appearance, button, isWorkleap)}
</div>

{canBeClosed && renderDismissButton(setShow,
isHorizontal ? "medium" : "xsmall",
onClose,
{canBeClosed && renderDismissButton(setShow,
isHorizontal ? "medium" : "xsmall",
onClose,
stringFormatter.format("close"))}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/BarChart/src/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface DataSet {
/** Add id for bar chart. */
id: string | number;
/** Add label text above the bar chart. */
label: string;
label: React.ReactNode;
/** The value displayed beside the bar chart. */
value: number;
/** Add the color to the bar chart. */
Expand Down
4 changes: 2 additions & 2 deletions packages/Checkbox/src/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ export const Disabled: Story = {
<Checkbox htmlFor="ids-checkbox-disabled" disabled>
Label
</Checkbox>

<Checkbox htmlFor="ids-checkbox-disabled-active" checked disabled>
Label
</Checkbox>

<Checkbox
htmlFor="ids-checkbox-disabled-indeterminate"
indeterminate
Expand Down
4 changes: 2 additions & 2 deletions packages/FormGroup/src/FormGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export interface FormGroupProps extends React.ComponentProps<"div"> {
/** Add a data-test tag for automated tests */
dataTest?: string;
/** Add a message below the form element */
message?: string;
message?: React.ReactNode;
/** Specifies the type of message to display */
messageType?: MessageType;
/** Add the htmlFor attribute to the label of the form element */
htmlFor?: string;
/** Add label text above the form element */
label?: string;
label?: React.ReactNode;
/** Decides when to show the message */
showMessage?: boolean;
}
Expand Down

0 comments on commit 2df12a9

Please sign in to comment.