Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs-layout): wrapped card in card.body and added background color #514

Merged
merged 1 commit into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 30 additions & 20 deletions apps/docs/content/components/container/autoLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,51 @@ export default function App() {
<Container gap={0}>
<Row gap={1}>
<Col>
<Card color="primary">
<Text h6 size={15} color="white" css={{ m: 0 }}>
1 of 2
</Text>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
1 of 2
</Text>
</Card.Body>
</Card>
</Col>
<Col>
<Card color="primary">
<Text h6 size={15} color="white" css={{ m: 0 }}>
2 of 2
</Text>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
2 of 2
</Text>
</Card.Body>
</Card>
</Col>
</Row>
<Spacer y={1} />
<Row gap={1}>
<Col>
<Card color="primary">
<Text h6 size={15} color="white" css={{ m: 0 }}>
1 of 3
</Text>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
1 of 3
</Text>
</Card.Body>
</Card>
</Col>
<Col>
<Card color="primary">
<Text h6 size={15} color="white" css={{ m: 0 }}>
2 of 3
</Text>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
2 of 3
</Text>
</Card.Body>
</Card>
</Col>
<Col>
<Card color="primary">
<Text h6 size={15} color="white" css={{ m: 0 }}>
3 of 3
</Text>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
3 of 3
</Text>
</Card.Body>
</Card>
</Col>
</Row>
Expand Down
18 changes: 10 additions & 8 deletions apps/docs/content/components/container/breakpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ const App = `import { Container, Card, Row, Text } from "@nextui-org/react";
export default function App() {
return (
<Container xl>
<Card color="primary">
<Row justify="center" align="center">
<Text h6 size={15} color="white" css={{ m: 0 }}>
NextUI gives you the best developer experience with all the features
you need for building beautiful and modern websites and
applications.
</Text>
</Row>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Row justify="center" align="center">
<Text h6 size={15} color="white" css={{ m: 0 }}>
NextUI gives you the best developer experience with all the features
you need for building beautiful and modern websites and
applications.
</Text>
</Row>
</Card.Body>
</Card>
</Container>
);
Expand Down
18 changes: 10 additions & 8 deletions apps/docs/content/components/container/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ const App = `import { Container, Card, Row, Text } from "@nextui-org/react";
export default function App() {
return (
<Container>
<Card color="primary">
<Row justify="center" align="center">
<Text h6 size={15} color="white" css={{ m: 0 }}>
NextUI gives you the best developer experience with all the features
you need for building beautiful and modern websites and
applications.
</Text>
</Row>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Row justify="center" align="center">
<Text h6 size={15} color="white" css={{ m: 0 }}>
NextUI gives you the best developer experience with all the features
you need for building beautiful and modern websites and
applications.
</Text>
</Row>
</Card.Body>
</Card>
</Container>
);
Expand Down
18 changes: 10 additions & 8 deletions apps/docs/content/components/container/fluid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ const App = `import { Container, Card, Row, Text } from "@nextui-org/react";
export default function App() {
return (
<Container fluid>
<Card color="primary">
<Row justify="center" align="center">
<Text h6 size={15} color="white" css={{ m: 0 }}>
NextUI gives you the best developer experience with all the features
you need for building beautiful and modern websites and
applications.
</Text>
</Row>
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Row justify="center" align="center">
<Text h6 size={15} color="white" css={{ m: 0 }}>
NextUI gives you the best developer experience with all the features
you need for building beautiful and modern websites and
applications.
</Text>
</Row>
</Card.Body>
</Card>
</Container>
);
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/content/components/grid/autoWidth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ const App = `import { Grid, Card, Text } from "@nextui-org/react";
export default function App() {
const MockItem = ({ text }) => {
return (
<Card color="primary" css={{ h: "$20" }}>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
<Card css={{ h: "$20", $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
</Card.Body>
</Card>
);
};
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/content/components/grid/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ const App = `import { Grid, Card, Text } from "@nextui-org/react";
export default function App() {
const MockItem = ({ text }) => {
return (
<Card color="primary" css={{ h: "$24" }}>
<Text h6 size={15} color="white" css={{ mt: 0 }}>
{text}
</Text>
<Card css={{ h: "$24", $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ mt: 0 }}>
{text}
</Text>
</Card.Body>
</Card>
);
};
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/content/components/grid/fluid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ const App = `import { Grid, Card, Text } from "@nextui-org/react";
export default function App() {
const MockItem = ({ text }) => {
return (
<Card color="primary" css={{ h: "$20" }}>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
<Card css={{ h: "$20", $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
</Card.Body>
</Card>
);
};
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/content/components/grid/hideElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ export default function App() {

const MockItem = ({ text }) => {
return (
<Card color="primary" css={{ h: "$20" }}>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
<Card css={{ h: "$20", $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
</Card.Body>
</Card>
);
};
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/content/components/grid/responsive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ export default function App() {

const MockItem = ({ text }) => {
return (
<Card color="primary" css={{ h: "$20" }}>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
<Card css={{ h: "$20", $$cardColor: '$colors$primary' }}>
<Card.Body>
<Text h6 size={15} color="white" css={{ m: 0 }}>
{text}
</Text>
</Card.Body>
</Card>
);
};
Expand Down
8 changes: 6 additions & 2 deletions apps/docs/content/components/spacer/horizontal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ const AppJs = `import { Spacer, Card } from "@nextui-org/react";
export default function App() {
return (
<Container gap={0} css={{ d: 'flex', flexWrap: 'nowrap' }}>
<Card color="primary" />
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body />
</Card>
<Spacer x={2} />
<Card color="primary" />
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body />
</Card>
</Container>
);
}`;
Expand Down
18 changes: 12 additions & 6 deletions apps/docs/content/components/spacer/vertical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@ const AppJs = `import { Spacer, Card } from "@nextui-org/react";
export default function App() {
return (
<>
<Card color="primary">
<Spacer y={1} />
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Spacer y={1} />
</Card.Body>
</Card>
<Spacer y={1} />
<Card color="primary">
<Spacer y={2} />
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Spacer y={2} />
</Card.Body>
</Card>
<Spacer y={1} />
<Card color="primary">
<Spacer y={3} />
<Card css={{ $$cardColor: '$colors$primary' }}>
<Card.Body>
<Spacer y={3} />
</Card.Body>
</Card>
</>
);
Expand Down