1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 06:24:19 +00:00

Add base Box component

This commit is contained in:
Stefano Pigozzi 2021-04-21 00:35:44 +02:00
parent 68cbc25d86
commit 1d35c53820
Signed by untrusted user who does not match committer: steffo
GPG key ID: 6965406171929D01
3 changed files with 32 additions and 2 deletions

View file

@ -1,14 +1,22 @@
import {useState} from "react"
import classNames from "classnames"
import Style from "./App.module.css"
import Box from "./components/Box"
export default function App() {
const [theme, setTheme] = useState("theme-dark");
const [theme, ] = useState("theme-dark");
return (
<div className={classNames(Style["app"], theme)}>
Ciao mondo!
<Box direction={"column"}>
<div>
Ciao
</div>
<div>
mondo!
</div>
</Box>
</div>
)
}

View file

@ -0,0 +1,15 @@
import React from "react"
import Style from "./Box.module.css"
import classNames from "classnames"
export default function Box({ children, className, ...props }) {
return (
<div
className={classNames(Style.Box, className)}
{...props}
>
{children}
</div>
)
}

View file

@ -0,0 +1,7 @@
.Box {
display: flex;
background-color: var(--bg-light);
border-radius: 999999px;
}