Skip to content

Commit

Permalink
Styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ianvexler committed Feb 14, 2024
1 parent 455a9c1 commit 0eb3eea
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 30 deletions.
4 changes: 2 additions & 2 deletions dist/components/footer/Footer.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
export interface FooterProps extends React.HTMLProps<HTMLBaseElement> {
organization: string;
organisation: string;
}
declare const Footer: ({ className, organization }: FooterProps) => React.JSX.Element;
declare const Footer: ({ className, organisation }: FooterProps) => React.JSX.Element;
export default Footer;
//# sourceMappingURL=Footer.d.ts.map
2 changes: 1 addition & 1 deletion dist/components/list/List.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface ListProps extends React.HTMLProps<HTMLDivElement> {
declare const List: {
({ children, ...rest }: ListProps): React.JSX.Element;
Head: ({ className, children, ...rest }: import("./components/ListHead").ListHeadProps) => React.JSX.Element;
Cell: ({ borderStart, className, children, ...rest }: import("./components/ListCell").ListCellProps) => React.JSX.Element;
Cell: ({ borderStart, className, children, background, ...rest }: import("./components/ListCell").ListCellProps) => React.JSX.Element;
Row: ({ children, ...rest }: import("./components/ListRow").ListRowProps) => React.JSX.Element;
Col: ({ className, children, ...rest }: import("./components/ListCol").ListColProps) => React.JSX.Element;
Body: ({ children, ...rest }: import("./components/ListBody").ListBodyProps) => React.JSX.Element;
Expand Down
3 changes: 2 additions & 1 deletion dist/components/list/components/ListCell.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
export interface ListCellProps extends React.HTMLProps<HTMLDivElement> {
borderStart?: boolean;
background?: string;
}
declare const ListCell: ({ borderStart, className, children, ...rest }: ListCellProps) => React.JSX.Element;
declare const ListCell: ({ borderStart, className, children, background, ...rest }: ListCellProps) => React.JSX.Element;
export default ListCell;
//# sourceMappingURL=ListCell.d.ts.map
2 changes: 1 addition & 1 deletion dist/components/list/components/ListCell.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components/list/components/ListRow.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components/title/Title.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import React from 'react';
export interface TitleProps extends React.HTMLProps<HTMLHeadingElement> {
text: string;
}
declare const Title: ({ text, ...rest }: TitleProps) => React.JSX.Element;
declare const Title: ({ text, className, ...rest }: TitleProps) => React.JSX.Element;
export default Title;
//# sourceMappingURL=Title.d.ts.map
2 changes: 1 addition & 1 deletion dist/components/title/Title.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/index.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.es.js.map

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22860,8 +22860,8 @@ Form$1.Feedback = Feedback$1;
Form$1.Text = FormText$1;

var Title = function (_a) {
var text = _a.text, rest = __rest(_a, ["text"]);
return React.createElement("h1", __assign$1({}, rest), text);
var text = _a.text, className = _a.className, rest = __rest(_a, ["text", "className"]);
return (React.createElement("h1", __assign$1({ className: "".concat(className, " mb-0") }, rest), text));
};

var Card = function (_a) {
Expand Down Expand Up @@ -22897,14 +22897,13 @@ var ListRow = function (_a) {
return (React.createElement(Row$1, __assign$1({ className: "text-center mt-3" }, rest), childrenArray.map(function (child, index) {
var childElement = child;
return React.cloneElement(childElement, {
key: index,
borderStart: index !== 0,
});
})));
};

var ListCell = function (_a) {
var borderStart = _a.borderStart, className = _a.className, children = _a.children, rest = __rest(_a, ["borderStart", "className", "children"]);
var borderStart = _a.borderStart, className = _a.className, children = _a.children, background = _a.background, rest = __rest(_a, ["borderStart", "className", "children", "background"]);
var section = React.useContext(ListSectionContext);
var border = borderStart ? 'border-start' : undefined;
switch (section) {
Expand All @@ -22914,7 +22913,7 @@ var ListCell = function (_a) {
case ListSection.NONE:
default:
return (React.createElement("div", __assign$1({ className: "h-100 d-flex align-items-center ".concat(className) }, rest),
React.createElement(Card$2, { className: "h-100 w-100 py-3" },
React.createElement(Card$2, { className: "h-100 w-100 py-3", style: { backgroundColor: background } },
React.createElement(Card$2.Body, { className: "d-flex justify-content-center align-items-center py-0 ".concat(border) },
React.createElement("div", { className: "w-100" }, children)))));
}
Expand Down Expand Up @@ -24375,11 +24374,11 @@ var UserProfile = function (_a) {
};

var Footer = function (_a) {
var className = _a.className, organization = _a.organization;
var className = _a.className, organisation = _a.organisation;
var currentYear = new Date().getFullYear();
return (React.createElement("footer", { className: "mt-auto pt-3 pb-2 text-end text-muted small ".concat(className) },
"Copyright \u00A9 ",
organization,
organisation,
" ",
currentYear));
};
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/layouts/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Layout = () => {
<Outlet />
</Container>
</main>
<Footer organization='Test' />
<Footer organisation='Test' />
</Container>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions src/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from 'react';

export interface FooterProps extends React.HTMLProps<HTMLBaseElement> {
organization: string;
organisation: string;
}

const Footer = ({ className, organization }: FooterProps) => {
const Footer = ({ className, organisation }: FooterProps) => {
const currentYear = new Date().getFullYear();

return (
<footer
className={`mt-auto pt-3 pb-2 text-end text-muted small ${className}`}
>
Copyright © {organization} {currentYear}
Copyright © {organisation} {currentYear}
</footer>
);
};
Expand Down
7 changes: 6 additions & 1 deletion src/components/list/components/ListCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { Card } from 'react-bootstrap';

export interface ListCellProps extends React.HTMLProps<HTMLDivElement> {
borderStart?: boolean;
background?: string;
}

const ListCell = ({
borderStart,
className,
children,
background,
...rest
}: ListCellProps) => {
const section = useContext(ListSectionContext);
Expand All @@ -30,7 +32,10 @@ const ListCell = ({
className={`h-100 d-flex align-items-center ${className}`}
{...rest}
>
<Card className="h-100 w-100 py-3">
<Card
className="h-100 w-100 py-3"
style={{ backgroundColor: background }}
>
<Card.Body
className={`d-flex justify-content-center align-items-center py-0 ${border}`}
>
Expand Down
1 change: 0 additions & 1 deletion src/components/list/components/ListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const ListRow = ({ children, ...rest }: ListRowProps) => {
const childElement = child as React.ReactElement;

return React.cloneElement(childElement, {
key: index,
borderStart: index !== 0,
});
})}
Expand Down
8 changes: 6 additions & 2 deletions src/components/title/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ export interface TitleProps extends React.HTMLProps<HTMLHeadingElement> {
text: string;
}

const Title = ({ text, ...rest }: TitleProps) => {
return <h1 {...rest}>{text}</h1>;
const Title = ({ text, className, ...rest }: TitleProps) => {
return (
<h1 className={`${className} mb-0`} {...rest}>
{text}
</h1>
);
};

export default Title;

0 comments on commit 0eb3eea

Please sign in to comment.