Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objects Settings - Add the "New object" button #1928

Merged
merged 3 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
addressing review comments
  • Loading branch information
Abhi3685 committed Oct 9, 2023
commit 64f716bcaff5bb12bd6d39ca4bc51a7bb3f1900c
10 changes: 9 additions & 1 deletion front/src/modules/ui/typography/components/H1Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled from '@emotion/styled';
type OwnProps = {
title: string;
fontColor?: H1TitleFontColor;
className?: string;
};

export enum H1TitleFontColor {
Expand All @@ -25,4 +26,11 @@ const StyledTitle = styled.h2<{
export const H1Title = ({
title,
fontColor = H1TitleFontColor.Tertiary,
}: OwnProps) => <StyledTitle fontColor={fontColor}>{title}</StyledTitle>;
className,
}: OwnProps) => {
return (
<StyledTitle fontColor={fontColor} className={className}>
{title}
</StyledTitle>
);
};
8 changes: 7 additions & 1 deletion front/src/pages/settings/SettingsObjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ const StyledIconDotsVertical = styled(IconDotsVertical)`
`;

const StyledHeader = styled.div`
align-items: center;
display: flex;
Abhi3685 marked this conversation as resolved.
Show resolved Hide resolved
justify-content: space-between;
margin-bottom: ${({ theme }) => theme.spacing(8)};
`;

const StyledH1Title = styled(H1Title)`
margin-bottom: 0;
`;

const activeObjectItems = [
Expand Down Expand Up @@ -102,7 +108,7 @@ export const SettingsObjects = () => {
<SubMenuTopBarContainer Icon={IconSettings} title="Settings">
<StyledContainer>
<StyledHeader>
<H1Title title="Objects" />
<StyledH1Title title="Objects" />
<Button
Icon={IconPlus}
title="New object"
Expand Down