diff --git a/index.ts b/index.ts index 31096a8..681f0ec 100644 --- a/index.ts +++ b/index.ts @@ -4,6 +4,7 @@ export * from "./src/Application/Application"; export * from "./src/Application/ApplicationError"; export * from "./src/Application/Kernel"; +export * from "./src/Components/Box"; export * from "./src/Components/Card"; export * from "./src/Components/Buttons/Buttons"; export * from "./src/Components/Curtains/Curtains"; diff --git a/src/Components/Box.tsx b/src/Components/Box.tsx new file mode 100644 index 0000000..743a203 --- /dev/null +++ b/src/Components/Box.tsx @@ -0,0 +1,14 @@ +import React, {PropsWithChildren} from "react"; +import {classes} from "../Utils"; + +/** + * Content box generic component. + */ +export function Box({children, className, ...props}: PropsWithChildren>): React.ReactElement +{ + return ( +
+ {children} +
+ ); +} diff --git a/src/Components/Card.tsx b/src/Components/Card.tsx index a28894f..d1dd8d1 100644 --- a/src/Components/Card.tsx +++ b/src/Components/Card.tsx @@ -1,6 +1,9 @@ import React, {PropsWithChildren} from "react"; import {classes} from "../Utils"; +/** + * Content card component. + */ export function Card({children, className, ...props}: PropsWithChildren>): React.ReactElement { return ( diff --git a/src/styles/components/_box.less b/src/styles/components/_box.less new file mode 100644 index 0000000..eb66a07 --- /dev/null +++ b/src/styles/components/_box.less @@ -0,0 +1,12 @@ +.box +{ + margin: 0.5em auto; + width: 50em; + max-width: 95%; + box-sizing: border-box; + + h1, h2, h3, h4, h5, h6 + { + margin: 0.33em 0 0.5em 0; + } +}