Skip to content

Commit 72fdff8

Browse files
authored
Merge pull request #27 from make-software/add-dynamic-page-tile-bottom-gap
add dynamic value as bottom gap
2 parents a1ec4bd + 8e0ab96 commit 72fdff8

5 files changed

Lines changed: 20 additions & 17 deletions

File tree

dist/cspr-design.es.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16840,7 +16840,8 @@ const Eh = S.ul.withConfig({
1684016840
componentId: "sc-2b2p7u-0"
1684116841
})(({
1684216842
theme: e,
16843-
withPadding: t
16843+
withPadding: t,
16844+
bottomGap: n = 24
1684416845
}) => e.withMedia({
1684516846
height: "100%",
1684616847
display: "flex",
@@ -16849,8 +16850,7 @@ const Eh = S.ul.withConfig({
1684916850
background: e.styleguideColors.backgroundPrimary,
1685016851
boxShadow: e.boxShadow.block,
1685116852
borderRadius: e.borderRadius.base,
16852-
marginBottom: 24,
16853-
// make it reponsive
16853+
marginBottom: n,
1685416854
padding: t ? "16px 0" : void 0
1685516855
}));
1685616856
function CC(e) {

dist/cspr-design.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/components/page-tile/page-tile.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { BaseProps } from '../../types';
22
export interface PageTileProps extends BaseProps {
33
withPadding?: boolean;
4+
bottomGap?: number;
45
}
56
export declare function PageTile(props: PageTileProps): import("react/jsx-runtime").JSX.Element;
67
export default PageTile;

dist/lib/components/page-tile/page-tile.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/page-tile/page-tile.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@ import { BaseProps } from '../../types';
55
/* eslint-disable-next-line */
66
export interface PageTileProps extends BaseProps {
77
withPadding?: boolean;
8+
bottomGap?: number;
89
}
910

10-
const StyledPageTile = styled.div<PageTileProps>(({ theme, withPadding }) =>
11-
theme.withMedia({
12-
height: '100%',
13-
display: 'flex',
14-
flexDirection: 'column',
15-
justifyContent: 'flex-start',
16-
background: theme.styleguideColors.backgroundPrimary,
17-
boxShadow: theme.boxShadow.block,
18-
borderRadius: theme.borderRadius.base,
19-
marginBottom: 24, // make it reponsive
20-
padding: withPadding ? '16px 0' : undefined,
21-
})
11+
const StyledPageTile = styled.div<PageTileProps>(
12+
({ theme, withPadding, bottomGap = 24 }) =>
13+
theme.withMedia({
14+
height: '100%',
15+
display: 'flex',
16+
flexDirection: 'column',
17+
justifyContent: 'flex-start',
18+
background: theme.styleguideColors.backgroundPrimary,
19+
boxShadow: theme.boxShadow.block,
20+
borderRadius: theme.borderRadius.base,
21+
marginBottom: bottomGap,
22+
padding: withPadding ? '16px 0' : undefined,
23+
}),
2224
);
2325

2426
export function PageTile(props: PageTileProps) {

0 commit comments

Comments
 (0)