-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Rewrite CardList docs (#7112)
- Loading branch information
Showing
5 changed files
with
187 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
packages/docs-app/src/examples/core-examples/cardListExamples.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
/* ! | ||
* (c) Copyright 2024 Palantir Technologies Inc. All rights reserved. | ||
*/ | ||
|
||
import dedent from "dedent"; | ||
import * as React from "react"; | ||
|
||
import { Card, CardList, Section, SectionCard } from "@blueprintjs/core"; | ||
import { CodeExample, type ExampleProps } from "@blueprintjs/docs-theme"; | ||
|
||
export const CardListBasicExample: React.FC<ExampleProps> = props => { | ||
const code = dedent` | ||
<CardList> | ||
<Card>Apples</Card> | ||
<Card>Oranges</Card> | ||
<Card>Bananas</Card> | ||
</CardList>`; | ||
return ( | ||
<CodeExample code={code} {...props}> | ||
<CardList> | ||
<Card>Apples</Card> | ||
<Card>Oranges</Card> | ||
<Card>Bananas</Card> | ||
</CardList> | ||
</CodeExample> | ||
); | ||
}; | ||
|
||
export const CardListBorderedExample: React.FC<ExampleProps> = props => { | ||
const code = dedent` | ||
<CardList bordered={true}> | ||
<Card>Bread</Card> | ||
<Card>Cheese</Card> | ||
<Card>Butter</Card> | ||
</CardList> | ||
<CardList bordered={false}> | ||
<Card>Honey</Card> | ||
<Card>Jam</Card> | ||
<Card>Peanut Butter</Card> | ||
</CardList>`; | ||
return ( | ||
<CodeExample code={code} {...props}> | ||
<CardList bordered={true}> | ||
<Card>Bread</Card> | ||
<Card>Cheese</Card> | ||
<Card>Butter</Card> | ||
</CardList> | ||
<CardList bordered={false}> | ||
<Card>Honey</Card> | ||
<Card>Jam</Card> | ||
<Card>Peanut Butter</Card> | ||
</CardList> | ||
</CodeExample> | ||
); | ||
}; | ||
|
||
export const CardListCompactExample: React.FC<ExampleProps> = props => { | ||
const code = dedent` | ||
<CardList compact={false}> | ||
<Card>Spaghetti</Card> | ||
<Card>Lasagna</Card> | ||
<Card>Ravioli</Card> | ||
</CardList> | ||
<CardList compact={true}> | ||
<Card>Penne</Card> | ||
<Card>Fettuccine</Card> | ||
<Card>Rigatoni</Card> | ||
</CardList>`; | ||
return ( | ||
<CodeExample code={code} {...props}> | ||
<CardList compact={false}> | ||
<Card>Spaghetti</Card> | ||
<Card>Lasagna</Card> | ||
<Card>Ravioli</Card> | ||
</CardList> | ||
<CardList compact={true}> | ||
<Card>Penne</Card> | ||
<Card>Fettuccine</Card> | ||
<Card>Rigatoni</Card> | ||
</CardList> | ||
</CodeExample> | ||
); | ||
}; | ||
|
||
export const CardListSectionExample: React.FC<ExampleProps> = props => { | ||
const code = dedent` | ||
<Section title="Fresh Ingredients"> | ||
<SectionCard padded={false}> | ||
<CardList bordered={false}> | ||
<Card>Tomatoes</Card> | ||
<Card>Garlic</Card> | ||
<Card>Olive Oil</Card> | ||
<Card>Basil</Card> | ||
<Card>Parmesan</Card> | ||
<Card>Pine Nuts</Card> | ||
</CardList> | ||
</SectionCard> | ||
</Section>`; | ||
return ( | ||
<CodeExample code={code} {...props}> | ||
<Section title="Fresh Ingredients"> | ||
<SectionCard padded={false}> | ||
<CardList bordered={false}> | ||
<Card>Tomatoes</Card> | ||
<Card>Garlic</Card> | ||
<Card>Olive Oil</Card> | ||
<Card>Basil</Card> | ||
<Card>Parmesan</Card> | ||
<Card>Pine Nuts</Card> | ||
</CardList> | ||
</SectionCard> | ||
</Section> | ||
</CodeExample> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b95a86d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[docs] Rewrite CardList docs (#7112)
Build artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job.