Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: "Chromatic"

# on:
# push:
# branches:
# - master
# paths:
# - "packages/lib/**"
# pull_request:
# paths:
# - "packages/lib/**"

on: pull_request
on:
push:
branches:
- master
paths:
- "packages/lib/**"
pull_request:
paths:
- "packages/lib/**"

jobs:
chromatic-deployment:
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/HalstackContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ const parseLabels = (labels: DeepPartial<TranslatedLabels>): TranslatedLabels =>
* This type is used to allow partial themes and labels objects to be passed to the HalstackProvider.
* This is an extension of the already existing Partial type, which only allows one level of partiality.
*/
type DeepPartial<T> = {
export type DeepPartial<T> = {
[P in keyof T]?: Partial<T[P]>;
};
type HalstackProviderPropsType = {
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/src/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { getMargin } from "../common/utils";
import { AdvancedTheme, spaces } from "../common/variables";
import DxcDropdown from "../dropdown/Dropdown";
import DxcFlex from "../flex/Flex";
import { HalstackProvider } from "../HalstackContext";
import { DeepPartial, HalstackProvider } from "../HalstackContext";
import useTheme from "../useTheme";
import dropdownTheme from "./dropdownTheme";
import TablePropsType, { ActionCellsPropsType, DeepPartial } from "./types";
import TablePropsType, { ActionCellsPropsType } from "./types";

const overwriteTheme = (theme: DeepPartial<AdvancedTheme>) => {
const newTheme = dropdownTheme;
Expand Down
4 changes: 1 addition & 3 deletions packages/lib/src/table/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Option } from "../dropdown/types";

type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
type Margin = {
top?: Space;
Expand All @@ -8,9 +9,6 @@ type Margin = {
};

type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
export type DeepPartial<T> = {
[P in keyof T]?: Partial<T[P]>;
};

export type ActionCellsPropsType = {
actions: Array<
Expand Down