Skip to content

Commit

Permalink
Merge branch 'main' into docs/PPDSC-2561-update-usage-section-in-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RashikaNewsUK authored Dec 16, 2022
2 parents c9d8d9a + 83c5709 commit 4a96414
Show file tree
Hide file tree
Showing 38 changed files with 4,901 additions and 475 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.env
.DS_STORE
.eslintcache
build
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
"date-fns": "^2.6.0",
"debounce": "^1.2.0",
"dequal": "^1.0.0",
"dotenv": "^16.0.3",
"downshift": "^6.1.7",
"file-saver": "^2.0.5",
"glob": "^8.0.3",
Expand Down
1 change: 1 addition & 0 deletions scripts/build-package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const dependenciesNotToBeIncluded = [
'jszip',
'file-saver',
'isomorphic-dompurify',
'dotenv',
'@storybook/react',
'@babel/runtime-corejs3',
'semver',
Expand Down
16 changes: 16 additions & 0 deletions site/components/component-api/common-logical-props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,19 @@ export const prefixLogicalProps = (
...rest,
attribute: `${prefix}.${attribute}`,
}));

export const getLogicalPropsTable = (
logicalPropsOverrides: OverridesRowsProps[] = [
...logicalPaddingOverrideProps,
...logicalMarginOverrideProps,
],
prefix: string = '',
defaults: {
[key in string]: string | string[];
} = {},
) =>
logicalPropsOverrides.map(({attribute, ...rest}) => ({
...rest,
attribute: `${prefix ? `${prefix}.` : ''}${attribute}`,
default: defaults[attribute],
}));

Large diffs are not rendered by default.

Loading

0 comments on commit 4a96414

Please sign in to comment.