import { css } from "./styled-system/css";
import { circle, stack } from "./styled-system/patterns";
function App() {
return (
<div className={stack({ direction: "row", p: "4" })}>
<div className={circle({ size: "5rem", overflow: "hidden" })}>
<img src="https://via.placeholder.com/150" alt="avatar" />
</div>
<div className={css({ mt: "4", fontSize: "xl", fontWeight: "semibold" })}>
John Doe
</div>
<div className={css({ mt: "2", fontSize: "sm", color: "gray.600" })}>
</div>
</div>
);
}
import { Box, Stack, Circle } from './styled-system/jsx'
function App() {
return (
<Stack direction="row" p="4" rounded="md" shadow="lg" bg="white">
<Circle size="5rem" overflow="hidden">
<img src="https://via.placeholder.com/150" alt="avatar" />
</Circle>
<Box mt="4" fontSize="xl" fontWeight="semibold">
John Doe
</Box>
<Box mt="2" fontSize="sm" color="gray.600">
</Box>
</Stack>
)
}
import { styled } from './styled-system/jsx'
import { cva } from './styled-system/css'
export const badge = cva({
base: {
fontWeight: 'medium',
borderRadius: 'md',
},
variants: {
status: {
default: {
color: 'white',
bg: 'gray.500',
},
success: {
color: 'white',
bg: 'green.500',
},
},
}
})
export const Badge = styled('span', badge)