docs
This commit is contained in:
parent
6c3b3e80b0
commit
438aa3f5b4
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "howl",
|
"name": "howl",
|
||||||
"module": "index.tsx",
|
"module": "index.tsx",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"exports": "./src/index.tsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun run --hot test/server.tsx"
|
"dev": "bun run --hot test/server.tsx"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,14 @@ export const Test = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Section>
|
<Section>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Avatar src="/user.jpg" /></div>
|
||||||
|
<div><Avatar src="/user.jpg" size={64} /></div>
|
||||||
|
<div><Avatar src="/user.jpg" size={48} rounded /></div>
|
||||||
|
<div><Avatar src="/user.jpg" style={{ border: "2px solid blue" }} /></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
{/* Size variations */}
|
{/* Size variations */}
|
||||||
<VStack gap={4}>
|
<VStack gap={4}>
|
||||||
<H2>Size Variations</H2>
|
<H2>Size Variations</H2>
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,14 @@ export const GrayBox: FC<PropsWithChildren & { style?: JSX.CSSProperties }> = ({
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<div style={{ display: "flex", flexDirection: "column", gap: "32px", padding: "24px" }}>
|
<div style={{ display: "flex", flexDirection: "column", gap: "32px", padding: "24px" }}>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<div style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px", display: "flex", flexDirection: "column", gap: "8px" }}>
|
||||||
|
<div><Box>Content</Box></div>
|
||||||
|
<div><Box bg="#3b82f6" p={16}>Content</Box></div>
|
||||||
|
<div><RedBox>Content</RedBox></div>
|
||||||
|
<div><GrayBox>Content</GrayBox></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2 style={{ fontSize: "20px", fontWeight: "bold", marginBottom: "16px" }}>Box Component</h2>
|
<h2 style={{ fontSize: "20px", fontWeight: "bold", marginBottom: "16px" }}>Box Component</h2>
|
||||||
<div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
|
<div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,14 @@ export const Button: FC<ButtonProps> = (props) => {
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<Section>
|
<Section>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Button>Click Me</Button></div>
|
||||||
|
<div><Button variant="secondary">Secondary</Button></div>
|
||||||
|
<div><Button variant="outline" size="lg">Large</Button></div>
|
||||||
|
<div><Button onClick={handleClick}>Action</Button></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
{/* Variants */}
|
{/* Variants */}
|
||||||
<VStack gap={4}>
|
<VStack gap={4}>
|
||||||
<H2>Button Variants</H2>
|
<H2>Button Variants</H2>
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,13 @@ export const Divider: FC<DividerProps> = ({ children, style }) => {
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<Section gap={4} maxWidth="448px" style={{ padding: "16px" }}>
|
<Section gap={4} maxWidth="448px" style={{ padding: "16px" }}>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Divider /></div>
|
||||||
|
<div><Divider>OR</Divider></div>
|
||||||
|
<div><Divider style={{ margin: "24px 0" }} /></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
<H2>Divider Examples</H2>
|
<H2>Divider Examples</H2>
|
||||||
|
|
||||||
<VStack gap={0}>
|
<VStack gap={0}>
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,14 @@ const justifyItemsMap = {
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<Section gap={4} style={{ padding: "16px" }}>
|
<Section gap={4} style={{ padding: "16px" }}>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Grid cols={3}>...</Grid></div>
|
||||||
|
<div><Grid cols={4} gap={6}>...</Grid></div>
|
||||||
|
<div><Grid cols={{ sm: 1, md: 2, lg: 3 }}>...</Grid></div>
|
||||||
|
<div><Grid cols={2} v="center" h="center">...</Grid></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
<VStack gap={6}>
|
<VStack gap={6}>
|
||||||
<H2>Grid Examples</H2>
|
<H2>Grid Examples</H2>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,14 @@ export const IconLink: FC<IconLinkProps> = (props) => {
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<Section>
|
<Section>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Icon name="Heart" /></div>
|
||||||
|
<div><Icon name="Star" size={8} /></div>
|
||||||
|
<div><Icon name="Home" style={{ color: "#3b82f6" }} /></div>
|
||||||
|
<div><IconLink name="ExternalLink" href="/link" /></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
{/* === ICON TESTS === */}
|
{/* === ICON TESTS === */}
|
||||||
|
|
||||||
{/* Size variations */}
|
{/* Size variations */}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,14 @@ export const Test = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Section>
|
<Section>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Image src="/photo.jpg" /></div>
|
||||||
|
<div><Image src="/photo.jpg" width={200} height={200} /></div>
|
||||||
|
<div><Image src="/photo.jpg" objectFit="cover" /></div>
|
||||||
|
<div><Image src="/photo.jpg" style={{ borderRadius: "8px" }} /></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
<H2>Image Examples</H2>
|
<H2>Image Examples</H2>
|
||||||
|
|
||||||
{/* Size variations */}
|
{/* Size variations */}
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,14 @@ export const Input: FC<InputProps> = (props) => {
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<Section maxWidth="448px">
|
<Section maxWidth="448px">
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Input placeholder="Enter name" /></div>
|
||||||
|
<div><Input type="email" placeholder="Email" /></div>
|
||||||
|
<div><Input>Label</Input></div>
|
||||||
|
<div><Input labelPosition="left">Name</Input></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
{/* Basic inputs */}
|
{/* Basic inputs */}
|
||||||
<VStack gap={4}>
|
<VStack gap={4}>
|
||||||
<H2>Basic Inputs</H2>
|
<H2>Basic Inputs</H2>
|
||||||
|
|
@ -178,6 +186,6 @@ export const Test = () => {
|
||||||
</Input>
|
</Input>
|
||||||
</VStack>
|
</VStack>
|
||||||
</VStack>
|
</VStack>
|
||||||
</VStack>
|
</Section>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,14 @@ export const Placeholder = {
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<Section>
|
<Section>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Placeholder.Avatar /></div>
|
||||||
|
<div><Placeholder.Avatar type="avataaars" size={64} /></div>
|
||||||
|
<div><Placeholder.Image width={200} height={200} /></div>
|
||||||
|
<div><Placeholder.Image seed={42} /></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
{/* === AVATAR TESTS === */}
|
{/* === AVATAR TESTS === */}
|
||||||
|
|
||||||
{/* Show all available avatar styles */}
|
{/* Show all available avatar styles */}
|
||||||
|
|
@ -48,7 +56,7 @@ export const Test = () => {
|
||||||
{allStyles.map((style) => (
|
{allStyles.map((style) => (
|
||||||
<VStack h="center" gap={1} key={style}>
|
<VStack h="center" gap={1} key={style}>
|
||||||
<Placeholder.Avatar type={style} size={48} />
|
<Placeholder.Avatar type={style} size={48} />
|
||||||
<SmallText style={{ fontWeight: "500" }}>{style}</Text>
|
<SmallText style={{ fontWeight: "500" }}>{style}</SmallText>
|
||||||
</VStack>
|
</VStack>
|
||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
@ -189,7 +197,7 @@ export const Test = () => {
|
||||||
</HStack>
|
</HStack>
|
||||||
</VStack>
|
</VStack>
|
||||||
</VStack>
|
</VStack>
|
||||||
</VStack>
|
</Section>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,14 @@ export const Section: FC<SectionProps> = ({ children, gap = 8, maxWidth, style }
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<div style={{ backgroundColor: "#f9fafb", padding: "16px", margin: "24px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px", display: "flex", flexDirection: "column", gap: "8px" }}>
|
||||||
|
<div><Section>...</Section></div>
|
||||||
|
<div><Section gap={4}>...</Section></div>
|
||||||
|
<div><Section maxWidth="600px">...</Section></div>
|
||||||
|
<div><Section style={{ backgroundColor: "#f3f4f6" }}>...</Section></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Section>
|
<Section>
|
||||||
<h2 style={{ fontSize: "20px", fontWeight: "bold" }}>Default Section</h2>
|
<h2 style={{ fontSize: "20px", fontWeight: "bold" }}>Default Section</h2>
|
||||||
<p>This is a section with default gap (8)</p>
|
<p>This is a section with default gap (8)</p>
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,8 @@ export const Select: FC<SelectProps> = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
|
const options = [{ value: "1", label: "Option 1" }, { value: "2", label: "Option 2" }]
|
||||||
|
|
||||||
const months = [
|
const months = [
|
||||||
{ value: "01", label: "January" },
|
{ value: "01", label: "January" },
|
||||||
{ value: "02", label: "February" },
|
{ value: "02", label: "February" },
|
||||||
|
|
@ -161,6 +163,14 @@ export const Test = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Section maxWidth="448px">
|
<Section maxWidth="448px">
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><Select options={options} /></div>
|
||||||
|
<div><Select options={options} placeholder="Choose" /></div>
|
||||||
|
<div><Select options={options}>Label</Select></div>
|
||||||
|
<div><Select options={options} labelPosition="left">Label</Select></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
{/* Basic selects */}
|
{/* Basic selects */}
|
||||||
<VStack gap={4}>
|
<VStack gap={4}>
|
||||||
<H2>Basic Selects</H2>
|
<H2>Basic Selects</H2>
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,14 @@ export const Test = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Section gap={8} style={{ padding: "16px" }}>
|
<Section gap={8} style={{ padding: "16px" }}>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<VStack gap={2} style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px" }}>
|
||||||
|
<div><VStack>...</VStack></div>
|
||||||
|
<div><VStack gap={4} v="center">...</VStack></div>
|
||||||
|
<div><HStack>...</HStack></div>
|
||||||
|
<div><HStack gap={6} h="between" v="center">...</HStack></div>
|
||||||
|
</VStack>
|
||||||
|
|
||||||
{/* HStack layout matrix */}
|
{/* HStack layout matrix */}
|
||||||
<VStack gap={2}>
|
<VStack gap={2}>
|
||||||
<H2>HStack Layout</H2>
|
<H2>HStack Layout</H2>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,14 @@ export const SmallText: FC<TextProps> = ({ children, style }) => (
|
||||||
export const Test = () => {
|
export const Test = () => {
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: "24px", display: "flex", flexDirection: "column", gap: "32px" }}>
|
<div style={{ padding: "24px", display: "flex", flexDirection: "column", gap: "32px" }}>
|
||||||
|
{/* API Usage Examples */}
|
||||||
|
<div style={{ backgroundColor: "#f9fafb", padding: "16px", borderRadius: "8px", fontFamily: "monospace", fontSize: "12px", display: "flex", flexDirection: "column", gap: "8px" }}>
|
||||||
|
<div><H1>Heading 1</H1></div>
|
||||||
|
<div><H2>Heading 2</H2></div>
|
||||||
|
<div><Text>Regular text</Text></div>
|
||||||
|
<div><SmallText>Small text</SmallText></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
|
<div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
|
||||||
<H1>Heading 1 (24px, bold)</H1>
|
<H1>Heading 1 (24px, bold)</H1>
|
||||||
<H2>Heading 2 (20px, bold)</H2>
|
<H2>Heading 2 (20px, bold)</H2>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user