Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Model a: "Inherit everithing and rewrite necessary"
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed Apr 3, 2023
1 parent ceaa97a commit 54a25f2
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
2 changes: 2 additions & 0 deletions base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@
@import "./src/styles/scss/internal";
// Should be last to make it easier to overwrite.
@import "./src/stories/Library/colors/color-classes";

@import "./src/stories/kids-universe/material-page";
3 changes: 3 additions & 0 deletions src/stories/Blocks/material-page/MaterialPage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export default {
description: {
control: { type: "text" },
},
kidsUniverse: {
control: { type: "boolean" },
},
},
} as ComponentMeta<typeof MaterialPage>;

Expand Down
9 changes: 8 additions & 1 deletion src/stories/Blocks/material-page/MaterialPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import clsx from "clsx";
import Disclosure from "../../Library/disclosure/Disclosure";
import { generateId } from "../../Library/horizontal-term-line/HorizontalTermLine";
import ListDescription, {
Expand All @@ -15,6 +16,7 @@ export interface MaterialPageProps {
periodical?: boolean;
ctaText?: string;
description?: string;
kidsUniverse?: boolean;
}

const MaterialPage: React.FC<MaterialPageProps> = ({
Expand All @@ -23,10 +25,15 @@ const MaterialPage: React.FC<MaterialPageProps> = ({
periodical,
ctaText,
description,
kidsUniverse,
}) => {
const amountOfRenders = [1, 2];
const className = clsx("material-page", {
"material-page--kids-universe": kidsUniverse,
});

return (
<div className="material-page">
<div className={className}>
<MaterialHeader
title={title}
author={author}
Expand Down
35 changes: 35 additions & 0 deletions src/stories/kids-universe/material-page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.material-page {
&--kids-universe {
background-color: #b5b4cc;

.material-header {
border-bottom: unset;
min-height: unset;

&__cover {
place-content: start center;
grid-row: 1/2;
grid-column: 1/2;
}

&__content {
grid-row: 1/2;
grid-column: 2/2;
padding: unset;
}
&__availability-label {
display: none;
}
}

.button-favourite {
display: none;
}

.material-description {
@include breakpoint-m {
padding-left: $s-6xl;
}
}
}
}

0 comments on commit 54a25f2

Please sign in to comment.