-
-
-
-
+ {children} +
+ ) +} diff --git a/components/shared/Section/Section.module.css b/components/shared/Section/Section.module.css new file mode 100644 index 0000000..b99aa76 --- /dev/null +++ b/components/shared/Section/Section.module.css @@ -0,0 +1,33 @@ +.content { + max-width: 80ch; + margin: 0 auto; + padding-block: 2em; + text-align: justify; + + --color-bg: var(--md-sys-color-background); + --color-text: var(--md-sys-color-on-background); +} + +.primary { + --color-bg: var(--md-sys-color-primary-container); + --color-text: var(--md-sys-color-on-primary-container); +} + +.secondary { + --color-bg: var(--md-sys-color-secondary-container); + --color-text: var(--md-sys-color-on-secondary-container); +} + +.tertiary { + --color-bg: var(--md-sys-color-tertiary-container); + --color-text: var(--md-sys-color-on-tertiary-container); +} + +.primary, +.secondary, +.tertiary { + background-color: var(--color-bg); + box-shadow: 0 0 0 100vmax var(--color-bg); + clip-path: inset(0 -100vmax); + color: var(--color-text); +} diff --git a/components/shared/Section/Section.tsx b/components/shared/Section/Section.tsx new file mode 100644 index 0000000..d0a5db9 --- /dev/null +++ b/components/shared/Section/Section.tsx @@ -0,0 +1,26 @@ +import { createContext, FC, PropsWithChildren, useContext } from 'react' +import styles from './Section.module.css' +import cx from 'classnames' + +type SectionContextType = 'primary' | 'secondary' | 'tertiary' | undefined + +interface Props { + color?: SectionContextType +} + +const SectionContext = createContext