-
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.
- Loading branch information
Showing
6 changed files
with
132 additions
and
60 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
54 changes: 0 additions & 54 deletions
54
packages/docs-app/src/examples/core-examples/dividerExample.tsx
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
packages/docs-app/src/examples/core-examples/dividerExamples.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,47 @@ | ||
/* ! | ||
* (c) Copyright 2024 Palantir Technologies Inc. All rights reserved. | ||
*/ | ||
|
||
import dedent from "dedent"; | ||
import * as React from "react"; | ||
|
||
import { Divider } from "@blueprintjs/core"; | ||
import { CodeExample, type ExampleProps } from "@blueprintjs/docs-theme"; | ||
|
||
export const DividerBasicExample: React.FC<ExampleProps> = props => { | ||
const code = dedent` | ||
Content above | ||
<Divider /> | ||
Content below`; | ||
return ( | ||
<CodeExample code={code} {...props}> | ||
<div> | ||
Content above | ||
<Divider /> | ||
Content below | ||
</div> | ||
</CodeExample> | ||
); | ||
}; | ||
|
||
export const DividerVerticalExample: React.FC<ExampleProps> = props => { | ||
const code = dedent` | ||
<div style={{ display: "flex" }}> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis aliquam elit. Quisque ultricies | ||
dolor non sapien dictum semper. | ||
<Divider /> | ||
Praesent auctor eros vitae lacus porttitor elementum. Curabitur dolor dolor, sodales eget mi eget, | ||
convallis scelerisque eros. | ||
</div>`; | ||
return ( | ||
<CodeExample code={code} {...props}> | ||
<div style={{ display: "flex" }}> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis aliquam elit. Quisque ultricies | ||
dolor non sapien dictum semper. | ||
<Divider /> | ||
Praesent auctor eros vitae lacus porttitor elementum. Curabitur dolor dolor, sodales eget mi eget, | ||
convallis scelerisque eros. | ||
</div> | ||
</CodeExample> | ||
); | ||
}; |
46 changes: 46 additions & 0 deletions
46
packages/docs-app/src/examples/core-examples/dividerPlaygroundExample.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,46 @@ | ||
/* | ||
* Copyright 2024 Palantir Technologies, Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import * as React from "react"; | ||
|
||
import { Button, ButtonGroup, Divider, H5, Switch } from "@blueprintjs/core"; | ||
import { Example, type ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme"; | ||
|
||
export const DividerPlaygroundExample: React.FC<ExampleProps> = props => { | ||
const [vertical, setVertical] = React.useState(false); | ||
|
||
const options = ( | ||
<> | ||
<H5>Example props</H5> | ||
<Switch checked={vertical} label="Vertical" onChange={handleBooleanChange(setVertical)} /> | ||
</> | ||
); | ||
|
||
return ( | ||
<Example options={options} {...props}> | ||
<ButtonGroup minimal={true} vertical={vertical}> | ||
<Button text="File" /> | ||
<Button text="Edit" /> | ||
<Divider /> | ||
<Button text="Create" /> | ||
<Button text="Delete" /> | ||
<Divider /> | ||
<Button icon="add" /> | ||
<Button icon="remove" /> | ||
</ButtonGroup> | ||
</Example> | ||
); | ||
}; |
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
edd18a6
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 Divider docs (#7124)
Build artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job.